Definition

A UUID (Universally Unique Identifier) is a 128-bit number used to identify information in computer systems. The defining property is independence: any machine can generate a UUID without communicating with any other machine, and the probability of two machines generating the same value is negligible.

UUIDs are defined by RFC 9562 (2024), which superseded RFC 4122. The Wikipedia UUID article provides an accessible overview of the format and version history.

Format

A UUID is written as 32 hexadecimal digits in five hyphen-separated groups:

550e8400-e29b-41d4-a716-446655440000
   8    -  4 -  4 -  4 -     12

Two positions carry structural meaning:

Everything else is version-specific payload — randomness, timestamp bits, or deterministic hash output depending on the version.

Pronunciation and full form

Why “universally unique”?

The word “universally” is a practical claim, not a mathematical guarantee. A UUID v4 has 122 bits of randomness, giving a space of 2¹²² possible values. The probability of two independently generated v4 UUIDs colliding becomes meaningful only at approximately 2.7 × 10¹⁸ values — a number far beyond any realistic generation rate. See Collision for the mathematics.

Versions

RFC 9562 defines eight versions. The two used for new work are:

For a complete breakdown see UUID Versions.

Common uses

What a UUID is not

Generate one now with the UUID v7 generator or UUID v4 generator.

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. The current standard is RFC 9562.

What is a UUID used for?

UUIDs are used as database primary keys, distributed system identifiers, idempotency keys for API requests, event and trace IDs, and offline record creation — any situation where unique IDs must be generated without a central authority.

Should I use v4 or v7?

Use v7 for database primary keys (time-sortable, index-friendly) and v4 for anything where creation order could leak information, like tokens or share links.

What does UUID stand for?

UUID stands for Universally Unique Identifier. It is a 128-bit label used to uniquely identify objects in computer systems without central coordination. The current specification is RFC 9562 (May 2024), published by the IETF. The Wikipedia UUID article covers the history from the Apollo NCS origins through RFC 4122 to RFC 9562.

How unique is a UUID in practice?

UUID v4 has 122 bits of randomness — roughly 5.3 × 10³⁶ possible values. The probability of generating two identical UUIDs is so small it is treated as zero for engineering purposes. GeeksforGeeks illustrates the birthday-problem math: you would need to generate 2.7 × 10¹⁸ UUIDs before a 50% chance of any collision — generating one billion per second for 85 years.

What is the standard format of a UUID string?

The canonical UUID string is 36 characters in the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx — 32 lowercase hexadecimal digits in five groups separated by hyphens. Position 13 (0-indexed) is the version digit and position 17 is the variant digit. This format is defined in RFC 9562 §4. Compact (no hyphens) and URN (urn:uuid:...) representations are also valid.