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.

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.

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.