Explainers

UUID vs GUID: What's the Difference?

Spend time in a Microsoft-heavy codebase and you'll hear "GUID" constantly. Move to a Java, Python or PostgreSQL project and the same-looking value is suddenly called a "UUID." New developers reasonably assume these must be different things, given how confidently each community uses its own term without ever mentioning the other. They're not different things, not in any way that usually matters, and the story of why two names exist for one format is a small piece of computing history rather than a technical distinction worth losing sleep over.

Quick answer

UUID and GUID refer to the same underlying concept: a 128-bit identifier written as 32 hexadecimal digits in five hyphen-separated groups. UUID is the formal term defined in RFC 4122 and used across most of the industry. GUID is Microsoft's own branding for the same format, dating back to COM and DCOM in the 1990s. The one real technical difference is internal byte ordering, which rarely affects anyone working with either as a string value.

Where did two names for the same thing come from?

The concept originated at Apollo Computer in the 1980s as part of its Network Computing System, and was later folded into the Distributed Computing Environment standard by the Open Software Foundation, eventually becoming the formal RFC 4122 specification in 2005 under the name UUID, Universally Unique Identifier. Microsoft, building COM and DCOM around the same general era, needed the same kind of unique identifier and coined its own term, GUID, Globally Unique Identifier, rather than adopting the terminology that other standards bodies were converging on. Both names describe essentially the same 128-bit value, just branded by two different lineages.

Is there any actual technical difference?

There's one genuine difference worth knowing: endianness, the internal byte ordering used to store the value. The RFC 4122 UUID standard uses big-endian, network byte order, for its first three components. Microsoft's GUID implementation uses a mixed-endian approach, with those same first three components stored in little-endian order internally. In practice this almost never surfaces as a problem, since when either value is passed around as its standard hyphenated string form, like 550e8400-e29b-41d4-a716-446655440000, the string representation is identical and any database driver handling the conversion does so automatically.

Which term should you actually use?

Follow the convention of whatever ecosystem you're working in rather than trying to standardise across the whole industry yourself. C#, .NET and SQL Server code and documentation say GUID almost universally. Java, Python, Rust, PostgreSQL and most general web and API documentation say UUID. Using the term your platform's own documentation uses keeps your code and comments consistent with what anyone else reading it will expect to see.

Why is version 4 the one everyone actually uses?

UUIDs come in several defined versions depending on how they're generated, some derived from a timestamp and hardware identifier, some from hashing a namespace and name together. Version 4 is generated almost entirely from randomness, which makes it simple to produce with no dependency on the current time or any external namespace, and it's why version 4 has become the default choice for general-purpose unique identifiers across nearly every modern programming language and framework.

The collision math backs this up comfortably: generating a billion version 4 UUIDs every single second would take roughly a hundred years before the odds of even one collision reached 50 percent. If you need UUID-style identifiers for testing, seeding a database, or documentation, the UUID generator on this site produces properly formatted 8-4-4-4-12 values instantly, entirely client-side.

Frequently Asked Questions

Is a GUID technically different from a UUID?

Functionally, no, both are 128-bit identifiers in the same 32-hex-digit, hyphen-grouped format. The one genuine technical difference is byte ordering, endianness, in how the first three sections are stored internally, but this rarely affects anyone working with either as a string.

Why does Microsoft use "GUID" instead of "UUID"?

Historical branding. When Microsoft developed COM and DCOM in the 1990s, it needed a unique identifier system and used its own term, GUID, rather than adopting the UUID terminology that had already been defined elsewhere.

Which term should I use in my own code and documentation?

Match your ecosystem's convention. C#, .NET and SQL Server code and documentation almost universally say GUID. Java, Python, Rust, PostgreSQL and most open web standards say UUID. Using the term your platform expects avoids confusing anyone reading your code.

What does the "v4" in UUID v4 actually mean?

It specifies which of several defined UUID generation methods was used. Version 4 is generated almost entirely from randomness, which is why it's the version most commonly used for general-purpose unique identifiers, as opposed to versions based on timestamps or namespace hashing.

How likely is a UUID collision in practice?

Vanishingly unlikely. Generating a billion version 4 UUIDs every second would take roughly a hundred years before there was even a 50 percent chance of a single collision occurring anywhere in that entire set.

Can a .NET GUID be used directly in a PostgreSQL UUID column?

Yes. Despite the internal endianness difference, when passed as a string a .NET GUID works correctly as a PostgreSQL UUID, since the database driver handles the conversion automatically without any manual reformatting required.

← Back to Guide