GUID vs UUID: What’s the Difference?
By SimpleTools24Published 6 min read
GUID and UUID are two names for the same thing: a 128-bit identifier written as 32 hexadecimal digits. “UUID” is the term used by the open standard; “GUID” is Microsoft’s name for it. The differences you’ll meet in practice are about formatting and byte order, not about the identifiers themselves.
In this guide
The Short Answer
RFC 9562, the current UUID standard, opens by defining UUIDs as “also known as GUIDs” (RFC 9562 (opens in a new tab)). A value created by Guid.NewGuid() in C# and one created by uuid.uuid4() in Python follow the same rules and can be stored in the same database column.
| GUID | UUID | |
|---|---|---|
| Stands for | Globally Unique Identifier | Universally Unique Identifier |
| Size | 128 bits | 128 bits |
| Typical text form | {8-4-4-4-12}, often uppercase | 8-4-4-4-12, often lowercase |
| Where the term is used | Windows, COM, .NET, SQL Server | Standards, Linux, Java, Python, PostgreSQL, web APIs |
| Defined by | Microsoft documentation, aligned with the UUID standard | RFC 9562 (May 2024) |
Where the Two Names Come From
UUIDs began in the Apollo Network Computing System, moved into the Open Software Foundation’s Distributed Computing Environment (DCE), and from there into Microsoft Windows (RFC 9562 (opens in a new tab)). Microsoft used the name GUID in COM and Windows, and the name carried through to .NET’s System.Guid.
The IETF published the identifier as RFC 4122 in 2005. In May 2024, RFC 9562 replaced it, adding versions 6, 7 and 8 and updated guidance on privacy and database use. If you see RFC 4122 cited, treat it as historical; RFC 9562 is current.
Format and Representation
The standard text form is five groups of hexadecimal digits separated by hyphens: 8-4-4-4-12. Letters may be uppercase, lowercase or mixed (RFC 9562 §4 (opens in a new tab)). Microsoft also defines a curly-braced string form (Microsoft Learn (opens in a new tab)), and many tools accept the hyphenless 32-digit form and the urn:uuid: prefix.
All of these represent the same value:
f81d4fae-7dec-11d0-a765-00a0c91e6bf6
F81D4FAE-7DEC-11D0-A765-00A0C91E6BF6
{f81d4fae-7dec-11d0-a765-00a0c91e6bf6}
f81d4fae7dec11d0a76500a0c91e6bf6
urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6The UUID validator accepts each of these and shows the canonical form.
GUIDs in .NET
In C#, Guid.NewGuid() creates a version 4 UUID with 122 bits of randomness (Microsoft Learn (opens in a new tab)), and from .NET 9 Guid.CreateVersion7() creates a time-ordered version 7 UUID (Microsoft Learn (opens in a new tab)). The format string passed to ToString controls how it’s written:
Guid id = Guid.NewGuid();
id.ToString(); // 8-4-4-4-12 (format "D", the default)
id.ToString("N"); // 32 digits, no hyphens
id.ToString("B"); // {8-4-4-4-12}
id.ToString("P"); // (8-4-4-4-12)Microsoft also advises against using NewGuid for cryptographic purposes. A GUID is an identifier, not a secret.
The One Real Difference: Byte Order
The text forms match, but the binary forms can differ. RFC 9562 stores all fields big-endian, while noting that Microsoft’s COM GUIDs store some fields little-endian (RFC 9562 §4 (opens in a new tab)). In .NET, that shows up in Guid.ToByteArray(): the first three groups come out byte-reversed. Python exposes both layouts as UUID.bytes (big-endian) and UUID.bytes_le (Python docs (opens in a new tab)).
This only matters when you move raw bytes between systems or rely on byte-level sorting. For example, it affects whether version 7 GUIDs stay in time order when stored as binary. Passing IDs as strings, or through a database driver’s native UUID type, avoids the problem.
GUID Versions
Because a GUID is a UUID, it carries the same version field: the first digit of the third group. A GUID can be version 1, 3, 4, 5, 6, 7 or 8. It isn’t automatically version 4, even though that’s what NewGuid produces. To check an existing GUID, paste it into the UUID decoder.
To create GUIDs in any version, with braces and uppercase if your system expects them, use the online GUID generator. Its C# examples cover NewGuid and CreateVersion7.
GUID and UUID tools
Frequently Asked Questions
Is a GUID the same as a UUID?
Yes, in practice. Both are 128-bit identifiers with the same text format. RFC 9562 defines UUIDs and says they are also known as GUIDs.
Why does Microsoft call them GUIDs?
Microsoft adopted the identifier from the DCE specification for COM and Windows and named it Globally Unique Identifier. The name stuck in .NET, SQL Server and Windows tooling.
Are all GUIDs version 4?
No. A GUID can be any UUID version. Guid.NewGuid() creates version 4, but .NET 9 added Guid.CreateVersion7(), and GUIDs from older systems may be other versions.
Can I store a .NET Guid in a PostgreSQL uuid column?
Yes. They are the same 128-bit value. Database drivers handle the conversion; just be careful if you convert to raw bytes yourself, because Guid.ToByteArray() uses Microsoft’s mixed-endian layout.
Should I write GUIDs in uppercase with braces?
Only if the system you’re feeding expects it. Case and braces are presentation choices; the standard hyphenated form is the most widely accepted.
Sources
- RFC 9562: Universally Unique IDentifiers (UUIDs) – IETF (May 2024; obsoletes RFC 4122) (opens in a new tab)
- Guid.NewGuid Method – Microsoft Learn (opens in a new tab)
- Guid.CreateVersion7 Method – Microsoft Learn (opens in a new tab)
- GUID: Curly Braced String Representation – Microsoft Learn (MS-DTYP) (opens in a new tab)
- uuid: UUID objects according to RFC 9562 – Python documentation (opens in a new tab)