UUID Generator (v4)
Generate one or many cryptographically-random version 4 UUIDs. Pure browser, backed by the Web Crypto API.
What is a UUID?
A Universally Unique Identifier (UUID), defined by RFC 4122, is a 128-bit value rendered as 32 hexadecimal digits in the canonical 8-4-4-4-12 pattern. UUIDs are used as primary keys in distributed systems, request identifiers, file names, idempotency keys — anywhere a unique value is needed without coordination between systems.
UUID versions at a glance
| Version | Source of uniqueness | Notes |
|---|---|---|
| v1 | MAC address + timestamp | Leaks host identity and ordering. |
| v3 / v5 | Namespace + name (MD5 / SHA-1) | Deterministic for the same input. |
| v4 | Cryptographic randomness | The default for most modern apps. |
| v7 | Unix timestamp + randomness | Sortable; ideal for database keys. |
This tool generates v4 UUIDs using crypto.randomUUID() when available, falling back to crypto.getRandomValues() on older engines. Both sources provide cryptographic-quality randomness.
How unique is a v4 UUID, really?
A version 4 UUID has 122 bits of randomness (six bits are fixed by the version and variant). The probability of a collision when generating a billion UUIDs is on the order of 10⁻¹⁸ — small enough that, for any application short of operating a planet-scale ID service, collisions can be treated as impossible.
FAQ
Are v4 UUIDs sortable?
No. v4 UUIDs are random and have no time component. If you need lexicographically sortable IDs (useful as database primary keys to reduce index fragmentation), consider UUIDv7, ULID, or KSUID.
Can I use UUIDs as URL paths?
Yes — they consist only of hex digits and hyphens, both URL-safe. The 36-character length is long but acceptable. Some teams use the no-hyphen form to save four characters.
What about nil and max UUIDs?
The nil UUID is 00000000-0000-0000-0000-000000000000 and is sometimes used as a placeholder. The max UUID is all fs. Neither is a valid v4 UUID, despite matching the shape.