About UUID/ULID/NanoID Generator
Generate sortable and random identifiers directly in your browser, with clear guidance on how each UUID version works and how to think about collision risk at scale.
utility
generate UUID v1/v3/v4/v5/v6/v7/v8, ULID, or NanoID identifiers
Example output:
018f4e4a-9a8f-7b62-9a75-9f46fd0f9b67
018f4e4a-9a8f-7e3f-9d1b-7f3526b287a1
018f4e4a-9a90-72e5-9bc0-51b0e7a12264
Generate sortable and random identifiers directly in your browser, with clear guidance on how each UUID version works and how to think about collision risk at scale.
UUID v7 produces lexicographically sortable, time-ordered IDs.
Input
Generator: UUID v7
Count: 3
Output
018f4e4a-9a8f-7b62-9a75-9f46fd0f9b67
018f4e4a-9a8f-7e3f-9d1b-7f3526b287a1
018f4e4a-9a90-72e5-9bc0-51b0e7a12264
UUID v5 is deterministic: the same namespace + name always yields the same ID.
Input
Generator: UUID v5
Namespace: 6ba7b810-9dad-11d1-80b4-00c04fd430c8 (DNS)
Name: engineering.lube.gg
Output
4de7f5f9-2f45-53d8-9e4f-2fe9baf50a19
| Format | How It Works | Deterministic | Sort Order | Collision Chance (1 in X) |
|---|---|---|---|---|
| UUID v1 | Timestamp + clock sequence + node identifier bytes. | No | Mostly time-ordered | 1 in 2^62 (~4.6e18) per same 100ns tick and node scope |
| UUID v3 | Namespace + name hashed with MD5 and mapped to UUID bits. | Yes | No | 1 in 2^122 (~5.3e36) for accidental hash collision cases |
| UUID v4 | 122 random bits from a secure RNG. | No | No | 1 in 2^122 (~5.3e36) |
| UUID v5 | Namespace + name hashed with SHA-1 and mapped to UUID bits. | Yes | No | 1 in 2^122 (~5.3e36) for accidental hash collision cases |
| UUID v6 | Reordered v1 timestamp bits with sequence + node fields. | No | Yes (time-ordered) | 1 in 2^62 (~4.6e18) per same 100ns tick and node scope |
| UUID v7 | Unix epoch milliseconds + random payload bits. | No | Yes (time-ordered) | 1 in 2^74 (~1.9e22) per same millisecond |
| UUID v8 | Vendor-defined/custom bit layout with UUID version/variant bits. | Depends on your layout | Depends on your layout | 1 in 2^N (depends on your random-bit budget) |
| ULID | 48-bit timestamp + 80-bit randomness in Crockford Base32. | No | Yes (lexicographic) | 1 in 2^80 (~1.2e24) per same millisecond |
| NanoID (21 chars) | Configurable alphabet/length; default uses URL-safe alphabet. | No | No | 1 in 2^126 (~8.5e37) with default 21-char configuration |
How should I choose between deterministic IDs and random IDs?
Use deterministic generators (for example UUID v3/v5) when the same input should always produce the same ID. Use random generators (UUID v4, NanoID) when uniqueness and unpredictability matter more than reproducibility.
When should I prefer sortable IDs like UUID v7, UUID v6, or ULID?
Prefer sortable IDs when you write time-sequenced records and want better index locality or chronological ordering in storage and logs.
What should I tune first when generating large batches of IDs?
Tune generator type and count for your workload, then tune NanoID length only if you need different entropy/size tradeoffs. Keep generation on the client side for quick experimentation before wiring into production flows.