UUID vs GUID
UUID and GUID are two names for the same 128-bit identifier. Here is the practical breakdown of where the terminology comes from, when each appears, and the small format conventions to watch out for.
Where the two names came from
The 128-bit unique identifier was first standardized by the Open Software Foundation (OSF) for DCE (Distributed Computing Environment), which called it a UUID. When Microsoft adopted the format for COM and OLE in the 1990s, they branded it "GUID." Both names refer to the same byte layout, the same algorithm, and the same version semantics. Today RFC 9562 (May 2024) is the authoritative specification and uses the term UUID throughout.
Format conventions you'll see in the wild
The five .NET Guid format strings produce different textual renderings of the identical underlying bytes:
Guid g = Guid.Parse("550e8400-e29b-41d4-a716-446655440000");
g.ToString("D") // 550e8400-e29b-41d4-a716-446655440000 (default, hyphenated)
g.ToString("N") // 550e8400e29b41d4a716446655440000 (no hyphens)
g.ToString("B") // {550e8400-e29b-41d4-a716-446655440000} (braced)
g.ToString("P") // (550e8400-e29b-41d4-a716-446655440000) (parens)
g.ToString("X") // {0x550e8400,0xe29b,0x41d4,{0xa7,0x16,...}} (struct)The byte-order gotcha
When serialized as raw bytes (not text), .NET'sGuid.ToByteArray()writes the first three groups in little-endian order, while RFC 9562 and most other languages use big-endian throughout. This bites developers who store Guids as binary in a non-Microsoft database and then read them with a different language. To avoid surprises, store UUIDs as text or as the RFC 9562 big-endian byte order; .NET 9 provides ToByteArray(bigEndian: true) for this.
Quick conversion
import uuid
# All of these parse to the same value:
uuid.UUID('550e8400-e29b-41d4-a716-446655440000') # canonical
uuid.UUID('550e8400e29b41d4a716446655440000') # no hyphens
uuid.UUID('{550e8400-e29b-41d4-a716-446655440000}') # braces
uuid.UUID('urn:uuid:550e8400-e29b-41d4-a716-446655440000') # urn: