ULID Generator + Decoder
Generate time-sortable ULIDs — bulk, monotonic, Crockford base32 — and decode any ULID’s timestamp, entirely on this device.
Decoded ULID
- Canonical (uppercase)
- —
- Timestamp (ms)
- —
- Timestamp (ISO 8601)
- —
- Randomness (base32)
- —
- Randomness (hex)
- —
Paste a 26-character ULID to read its timestamp and randomness.
Press ? for shortcuts
Do it offline:$ npx ulid
How to use it
- Set a count from 1 to 100,000 and press Regenerate; above 10,000 a worker takes over.
- Turn on Monotonic to order same-millisecond values, then copy the list or download .txt, .csv or .json.
- Switch to Decode, paste a 26-character ULID, and read its timestamp and randomness below.
A ULID packs a 48-bit millisecond timestamp and 80 random bits into 26 Crockford characters, so its text sorts in creation order. Generate 1 to 100,000, switch on Monotonic to order same-millisecond values, or paste a ULID into Decode for its timestamp. Nothing leaves your browser.
How it works
Crockford base32 is 0-9 and A-Z without I, L, O or U. The first ten characters are a 48-bit millisecond clock and the last sixteen are 80 crypto-random bits, so string order is creation order.
Plain randomness leaves two IDs from one millisecond unordered. Monotonic mode draws the 80 bits once, then adds one per later value, so the batch ascends.
Examples
01ARZ3NDEKTSV4RRFFQ69G5FAVtime 2016-07-30T23:54:10.259Z · 1469922850259 ms · random TSV4RRFFQ69G5FAV = d6764c61efb99302bd5bBase32-decoding the first ten characters recovers the creation instant; the last sixteen are the randomness, in base32 and hex.
count = 3 · monotonic burst01KZK69SG07AFJHHZ1PG6PYMG0
01KZK69SG07AFJHHZ1PG6PYMG1
01KZK69SG07AFJHHZ1PG6PYMG2One captured Monotonic run: the time head is shared and only the tail steps up, so the three sort as drawn.
Every example on this page is executed against the same engine that powers the tool, on every build.
Gotchas worth knowing
Same millisecond needs Monotonic
Two values from one millisecond can arrive in either order, so leave Monotonic on when order must hold.
Every ULID starts 0 to 7
Ten base32 characters could hold 50 bits, but the timestamp is 48, so the first never passes 7; Decode rejects anything higher.
Common errors
100,000 is the browser-side cap — need more? script it: `npx ulid`- The message names a real escape hatch: npx ulid, the same package this page mirrors.
"O" at position 26 isn't used in Crockford base32 — did you mean 0?- Crockford has no I, L, O or U, so a typed O is refused with its position and the fix.
FAQ
Is a ULID case-sensitive?
No — Crockford base32 maps both cases to one value, so Decode takes either and returns uppercase.
Do I need Monotonic mode?
Only when order within one millisecond matters, like bulk inserts; otherwise the clock already separates IDs.
Can I convert a ULID to a UUID?
Both are 128 bits, so a lossless mapping exists, but not here — the ID format hub does that.