Generate UUID v5
A 128-bit deterministic identifier produced by SHA-1-hashing a namespace UUID together with a name string — the modern, non-MD5 replacement for v3.
Result
Recomputes whenever the namespace or name changes. Same inputs always produce the same ID.
Inputs
This ID
Collision
The same namespace and name intentionally return the same UUID; that is not an accidental collision. The estimate is only about different inputs landing on the same 122-bit UUID output after version and variant bits are fixed.
Validate and parse UUID v5
Paste an ID
About UUID v5
Use when: you need a stable, repeatable ID derived from a name within a namespace — caching keys, content addressing, idempotent upserts.
Avoid when: you need an unguessable ID. v5 is deterministic; anyone with the inputs can recompute it. Use v4 for randomness.
How it is generated
A v5 UUID is v3’s modern replacement: same recipe, but with SHA-1 in place of MD5. Still fully deterministic — the same namespace and name always yield the same UUID.
SHA-1 outputs 20 bytes; you take the leftmost 16 and stamp the version/variant bits over the top.
Use this when you want stable IDs derived from a name within a namespace — caching keys, content addressing, idempotent upserts.
- 01 Concatenate namespace bytes (16) and name bytes (UTF-8) into one buffer.
- 02 Compute SHA-1 of the buffer, take the first 16 bytes of the 20-byte digest.
- 03 Overwrite the high nibble of byte 6 with 0101 (version 5) and the top two bits of byte 8 with 10 (variant).
- 04 Hex-encode with dashes after bytes 4, 6, 8, 10.
xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx └──┬───┘ └─┬┘ └─┬┘ └─┬┘ └────┬─────┘ │ │ │ │ └── digest bytes 10..15 (48 bits) │ │ │ └────────── variant "10" + low 14 bits of digest bytes 8..9 │ │ └─────────────── version "5" + low 12 bits of digest bytes 6..7 │ └──────────────────── digest bytes 4..5 (16 bits) └────────────────────────── digest bytes 0..3 (32 bits) Source: SHA-1(namespace_uuid (16B) ++ name_utf8), take the first 16 bytes of the 20-byte digest. Only the version nibble and variant bits are overwritten; everything else is the digest.
All of this runs in your browser. Random bytes come from crypto.getRandomValues, timestamps come from the system clock, and nothing about the generated ID leaves the tab.