Generate, dissect and stress-test UUIDv7, ULID and NanoID
Create five kinds of identifiers in one place. See the 48-bit timestamp and random bits laid out field by field, then use the birthday paradox to check collision risk and the entropy you actually need. Everything stays in this browser.
0 bytes of your input sent to a server (advertising and affiliate widgets excluded)
- 5ID formats
- 100per batch
- 128 bitsmax random entropy
- 0API calls
ID batch generator
Pick a format and a count; IDs are produced instantly from cryptographic randomness. No generation history is stored anywhere.
Keep values increasing even within the same millisecond. Guaranteed within one process only.
The default is the standard 64-character NanoID alphabet. Keep only the characters you want (2–64 unique characters).
Generated IDs
| # | ID | Info |
|---|
Export
Copy or download the batch as newline text, SQL, JSON or CSV.
Preview
ID decoder and timestamp extractor
Paste a UUID (v1, v4 or v7), ULID or KSUID and the version, variant, timestamp and random fields are split apart. NanoID has no timestamp, so only the format is identified.
Decoded fields
Press an example to decode it.
Collision probability calculator
Birthday-paradox maths for the chance of a collision over a period, and how many IDs each target probability needs. All it needs is the random bit count and your generation rate.
Result for the period
B-Tree index locality comparison
How a primary key is stored changes insert cost and cache efficiency.
| Format | Ordering | Index locality | Write pattern | Notes |
|---|---|---|---|---|
| UUIDv4 | Random | Poor | Random page splits | 122 random bits, works with standard UUID tooling |
| UUIDv7 | Time-ordered | Good | Append at the end | 48-bit ms + 74 random bits, optional monotonic counter |
| ULID | Time-ordered | Good | Append at the end | 26-character Crockford Base32, 80 random bits |
| KSUID | Time-ordered | Good | Append at the end | 27-character Base62, second epoch, 128 random bits |
| NanoID | Random | Poor | Random page splits | Free alphabet and length, no timestamp |
Scroll the table sideways to see more.
How to use it
Three steps are enough. Nothing you enter is stored.
Frequently asked questions
Are the generated IDs really random?
Only the Web Crypto function crypto.getRandomValues is used. Math.random is never called, and nothing is sent to a server or over the network. Random bits come from the operating system CSPRNG.
Should I use UUIDv7 or ULID?
Both are good when primary-key ordering and index locality matter. UUIDv7 is a 16-byte binary value that works with standard UUID columns and tools; ULID is 26 characters of text that is easy to move through logs, URLs and CSV. Both start with a 48-bit millisecond timestamp.
How long should a NanoID be?
The default 21 characters (64-character alphabet, about 126 bits) is enough for most services. If you want shorter IDs, run your expected volume through the collision calculator below. At 8 characters (48 bits) collisions become a real risk at a few million IDs.
Why does the KSUID timestamp start in 2014?
The KSUID epoch is 2014-05-13T16:53:20Z (1,400,000,000 seconds). The decoder adds that offset to show the real UTC and KST time, and separates the first 4 bytes of epoch seconds from the 16-byte payload.
Why is UUIDv4 bad for a database index?
The value is fully random, so every insert lands in a different place. A B-Tree splits pages in the middle and misses its cache more often, which slows bulk inserts. UUIDv7, ULID and KSUID are time-ordered and append at the end of the index.
Can I use these IDs as production keys?
The formats follow RFC 9562 and their specifications, but this tool is for learning and verification. Generate production keys on your server and avoid writing them to browser history or logs. If you need it, the monotonic option removes same-millisecond ordering ties.
Practical guides
Five notes, from choosing a format to calculating collision risk.
- UUIDv4 vs UUIDv7: which one, and whenBit layout, sorting habits, index impact and the pitfalls of monotonic mode, compared for real systems.
- ULID structure: why 26 characters sort by timeThe 48-bit timestamp, 80 random bits, Crockford Base32, monotonic ULIDs and the details that trip people up.
- NanoID: designing entropy with alphabet and lengthHow the default 64-character alphabet and 21 characters produce 126 bits, where short IDs become risky, and the traps in custom alphabets.
- KSUID: the 2014 epoch and 27 Base62 charactersFour bytes of epoch seconds, a 128-bit payload, Base62 ordering, and how KSUID compares with ULID and UUIDv7.
- Calculating ID collision risk with the birthday paradoxThe collision formula, IDs needed per bit width, and the real numbers for 1,000 IDs per second over ten years.