A reference for the terms that come up repeatedly when working with UUIDs. Each entry has its own page with a full explanation, code examples where relevant, and answers to common questions.
Why a UUID glossary?
UUID terminology is compact but precise. The difference between a version and a variant, or between entropy and a collision, matters when you are choosing an identifier strategy, debugging unexpected sort behaviour in a database, or implementing RFC 9562 from scratch. These definitions aim to be exact without being academic — each term is explained in the context of real engineering decisions.
Terms in this glossary
UUID is the base concept — a 128-bit identifier any machine can generate independently. Understanding the canonical 8-4-4-4-12 string format and the two fixed positions (version at character 13, variant at character 17) is the starting point for everything else here.
GUID (Globally Unique Identifier) is Microsoft’s name for the same standard. It is covered here because the two terms appear interchangeably in documentation, and there is one practical difference worth knowing: SQL Server stores GUIDs in a non-standard byte order that affects sort behaviour for UUID v7.
Variant is the 2-bit field that identifies which UUID layout specification applies. All standard RFC 9562 UUIDs have variant bits 10, which is why the first digit of the fourth group is always one of 8, 9, a, or b.
Namespace is a UUID used as a domain separator when generating name-based UUIDs (v3 and v5). Hashing the same name in two different namespaces produces two completely different UUIDs — this is the mechanism that lets independent systems produce stable, deterministic identifiers without colliding.
Collision is when two independently generated UUIDs share the same value. With 122 bits of randomness, UUID v4 requires generating approximately 2.7 × 10¹⁸ values before a collision becomes likely. In practice this is treated as impossible.
Nil UUID (00000000-0000-0000-0000-000000000000) is the all-zeros sentinel defined by RFC 9562 to represent the absence of a value — the UUID equivalent of null or zero.
Entropy refers to the unpredictable bits in a UUID. UUID v4 carries 122 bits of cryptographic entropy from a CSPRNG; UUID v7 carries 74 bits alongside a 48-bit timestamp. Understanding entropy is important when evaluating collision risk and deciding whether a UUID is safe to expose in a URL.
Lexicographical order is alphabetical string sort. UUID v7 is designed so that sorting UUIDs as plain strings produces the same sequence as sorting by creation time — a property that makes v7 index-friendly in B-tree databases like PostgreSQL and MySQL.
How to use this reference
Start with UUID if the format itself is new to you. If you are choosing between v4 and v7 for a database primary key, Lexicographical Order and Entropy are the two terms that explain the trade-off. If you are implementing name-based UUIDs (v5) for stable identifiers, read Namespace first.
All terms
- Collision
- When two independently generated UUIDs share the same value. With v4's 122 bits of randomness you need 2.7 × 10¹⁸ values before a collision becomes likely.
- Entropy
- The bits of cryptographic randomness in a UUID. UUID v4 carries 122 bits from a CSPRNG; UUID v7 carries 74 bits alongside a 48-bit timestamp.
- GUID
- Microsoft's name for the same 128-bit identifier standard as UUID. Interchangeable in most contexts — with a SQL Server byte-order quirk for v7.
- Lexicographical Order
- Alphabetical string sort. UUID v7 embeds a timestamp in its leading bits so string-sorting UUIDs gives chronological order — critical for B-tree index performance.
- Namespace
- A UUID used as a domain separator when generating name-based UUIDs (v3/v5). The same name hashed in two different namespaces produces two distinct UUIDs.
- Nil UUID
- The all-zeros UUID — 00000000-0000-0000-0000-000000000000. A sentinel value representing "no UUID assigned", analogous to null or zero in other types.
- UUID
- Universally Unique Identifier — a 128-bit number formatted as 32 hex digits in 8-4-4-4-12 groups. Any machine can generate one without coordination.
- Variant
- A 2-bit field at position 17 of the UUID string that identifies the layout specification. RFC 9562 UUIDs always show 8, 9, a, or b at that position.
Frequently asked questions
What does UUID stand for?
UUID stands for Universally Unique Identifier — a 128-bit number used to identify information across systems without a central authority. It is written as 32 hexadecimal digits in the format 8-4-4-4-12.
What is the difference between UUID and GUID?
There is no technical difference. GUID (Globally Unique Identifier) is Microsoft's term for the same 128-bit standard. Both follow RFC 9562 and are interchangeable in all but name.
How likely is a UUID collision?
Extremely unlikely. UUID v4 has 122 bits of randomness. You would need to generate approximately 2.7 × 10¹⁸ UUIDs before the probability of any collision reaches 50%. In practice, UUID collisions are treated as impossible.