GUID and UUID
They are the same 128 bits under two names. GUID is Microsoft vocabulary, UUID is the RFC's. The only difference that can bite you is the byte order in which some Microsoft APIs write them.
The two words are used interchangeably, and for the text form that is correct. The moment either becomes a byte array, the vocabulary stops being the interesting part.
f81d4fae-7dec-11d0-a765-00a0c91e6bf6out{f81d4fae-7dec-11d0-a765-00a0c91e6bf6}.NET calls this format B
01890a5d-ac96-774b-bcce-b302099a8057out{01890a5d-ac96-774b-bcce-b302099a8057}A v7, in the same clothes
On this page (7)
Where the two names come from#
The IETF standardised the identifier and called it a UUID; RFC 9562 is the current text. Microsoft shipped the same thing in COM and called it a GUID, a Globally Unique Identifier, and the name stuck across Windows, .NET and SQL Server. ITU-T X.667 and ISO/IEC 9834-8 describe it again for their own audiences, and RFC 9562 notes that both sets of specifications have been aligned and are fully technically compatible.
RFC 9562 § 4 · UUID FormatThe format the word UUID refers to
Where they differ#
| RFC 9562 world | Microsoft world | |
|---|---|---|
| Text form | f81d4fae-7dec-11d0-… | identical, often in capitals |
| Punctuation habits | plain, or urn:uuid: | braces, and the N/D/B/P/X format letters |
| Byte order of the first three groups | big-endian | little-endian in memory and in ToByteArray() |
| Database column | uuid | uniqueidentifier |
| Generator | v4, v7 and the rest | NEWID, NEWSEQUENTIALID, Guid.NewGuid |
The byte order is the only row that can corrupt data. Everything else is spelling.
The one that bites#
Guid.ToByteArray() reverses the bytes of the first three groups. Java, Go, Python's uuid.bytes and every RFC-conforming implementation do not. Feed one to the other and you get a valid-looking identifier that belongs to a different row, with no error anywhere. .NET 8 added ToByteArray(bigEndian: true) and a matching constructor, which is the fix when you control both ends.
So which word should I use?#
Say GUID inside a Microsoft codebase, UUID everywhere else, and neither in a schema comment: write down the version and the byte order instead. Those are the two facts the next person actually needs.
Questions people actually ask#
Is a GUID the same as a UUID?
Yes. The same 128 bits and the same layouts. Only the byte order used by some Microsoft APIs differs, and only when the value becomes bytes.
Can I store a GUID in a PostgreSQL uuid column?
Yes, as long as you move it as text or in RFC byte order. The mixed-endian byte array is a different value.
Does Microsoft follow RFC 9562?
Modern .NET does: it generates v4 and, since .NET 9, v7, and it can read and write big-endian bytes. The older APIs keep the mixed-endian habit.
Related#
Browse the reference
Start here
Making and converting in bulk
Converting a UUID
Reading one
The versions, in order
In a database
ULID and the alternatives
Running the tool