opyebULIDLab
Track 53 · ID LAB

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.

CSPRNG
ID format

Generated IDs

#IDInfo

Export

Copy or download the batch as newline text, SQL, JSON or CSV.

Format

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.

Examples

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.

BigInt

Result for the period

B-Tree index locality comparison

How a primary key is stored changes insert cost and cache efficiency.

FormatOrderingIndex localityWrite patternNotes
UUIDv4RandomPoorRandom page splits122 random bits, works with standard UUID tooling
UUIDv7Time-orderedGoodAppend at the end48-bit ms + 74 random bits, optional monotonic counter
ULIDTime-orderedGoodAppend at the end26-character Crockford Base32, 80 random bits
KSUIDTime-orderedGoodAppend at the end27-character Base62, second epoch, 128 random bits
NanoIDRandomPoorRandom page splitsFree 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.

Choose format and countPick UUIDv4, UUIDv7, ULID, NanoID or KSUID and a count from 1 to 100.
Adjust optionsFor NanoID set the alphabet and length (2–64); for UUIDv7 and ULID enable monotonic mode to keep increasing within the same millisecond.
Copy or exportCopy or save the batch as newline text, SQL INSERT/VALUES, JSON or CSV.

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.