2026-08-07
What is a UUID? Universally unique identifiers explained
Learn what UUIDs are, how the 8-4-4-4-12 format works, and when apps use them - then generate v4 UUIDs locally.
A UUID (Universally Unique Identifier) is a 128-bit value used to identify records, requests, files, and resources without a central ID authority. You will usually see it as a 36-character string with hyphens - five hex groups in an 8-4-4-4-12 pattern - for example 550e8400-e29b-41d4-a716-446655440000.
What a UUID looks like
The string form is hexadecimal digits separated by hyphens. Internally it is 16 bytes. RFC 4122 defines several versions; the version number appears in a specific nibble of the third group, and variant bits mark the layout so systems agree on how to interpret the value.
xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx M = version (4 for random v4) N = variant bits
Why developers use UUIDs
- Primary keys generated on the client or across many services without a shared counter
- Correlation IDs for logs, traces, and distributed requests
- Idempotency keys and upload handles that must not collide across nodes
- Merge-friendly datasets where multiple writers create rows offline
UUID vs auto-increment integers
Sequential integers are small and ordered, but they require a central allocator and can leak growth rates. UUIDs are larger and (for v4) unordered, yet they can be minted anywhere. Many teams accept the storage and index cost for that flexibility; others prefer time-sortable schemes such as ULID or UUID v7 when ordering matters.
Uniqueness and privacy
For version 4 (random) UUIDs, collision chance at normal application scale is negligible. UUIDs are still identifiers, not secrets - do not treat possession of a UUID as authorization by itself.
Need a few v4 UUIDs for fixtures or API tests? Generate them locally in your browser - nothing is uploaded.
Open the free UUID generator →
Next reads: How to generate UUID v4 · UUID v4 vs v1