ULID Generator & Decoder

Generate sortable ULIDs in bulk or decode one back into its timestamp, random bits and UUID form.

Options

Decode a ULID

Timestamp (ms)
UTC time
Local time
Randomness (80 bits)
UUID form (128 bits)
No uploads. Your files stay on your device.

Free forever, no sign-up, no cookies. Buy me a coffee

How it works

A ULID (Universally Unique Lexicographically Sortable Identifier) is 128 bits written as 26 characters of Crockford Base32: a 48-bit Unix millisecond timestamp in the first 10 characters, then 80 random bits in the last 16. Because the timestamp comes first and Base32 sorts the same way the bytes do, ULIDs sort chronologically as plain strings, which is exactly what a random UUID v4 cannot do. This page follows the ULID specification, including its monotonic rule: when several IDs are minted in the same millisecond the random part is incremented by one instead of redrawn, so they still sort in creation order.

The random bits come from crypto.getRandomValues(), the browser's cryptographically secure source. The decoder accepts any case and applies Crockford's forgiving rules, reading I and L as 1 and O as 0; U is not part of the alphabet and is rejected. It shows the millisecond timestamp, the UTC and local time, the randomness in hex and the same 128 bits rewritten in UUID notation, which is how ULIDs are usually stored in a uuid or binary(16) column. Everything runs in your browser: nothing is uploaded, nothing is logged, and the page works offline.

Frequently asked questions

What is a ULID?

A ULID is a 128-bit identifier written as 26 characters of Crockford Base32. The first 10 characters hold a 48-bit Unix millisecond timestamp and the last 16 hold 80 random bits. Because the time comes first and Base32 sorts the same way the underlying bytes do, ULIDs sort chronologically as plain strings while staying practically impossible to collide.

How do I decode a ULID timestamp?

Paste the ULID into the decoder on this page and it splits it for you: the millisecond epoch value, the UTC time, your local time, the 80 random bits in hex, and the same 128 bits rewritten in UUID notation for storing in a uuid or binary(16) column. Decoding follows Crockford's forgiving rules, so case does not matter and I and L are read as 1 and O as 0.

Is a ULID better than a UUID v4?

For database keys, usually yes. A UUID v4 is fully random, so consecutive inserts scatter across the index and cause page splits, while a ULID appends in time order. ULIDs are also shorter to type and URL safe with no hyphens. UUID v7 gives you the same time-ordered property in the standard UUID format, so pick ULID when you want the compact 26-character text form and monotonic ordering inside a single millisecond.

Report a bug