🆔 ULID Generator

Generate ULIDs — 26-character identifiers that are lexicographically sortable by creation time and encode 80 bits of cryptographically secure randomness. A drop-in, sortable alternative to UUIDs.

The two halves of a ULID

A ULID is 26 characters of Crockford base32 - the digits plus 22 letters, with I, L, O and U left out so nothing can be misread as 1 or 0. It splits at character 10:

01M1Z51000JBS4C7X0YE3P2QMV
|________||______________|
 10 chars      16 chars
 48-bit ms     80 random bits from
 timestamp     crypto.getRandomValues

The timestamp is Date.now() written in base32, most significant digit first, which is what makes plain string sorting match creation order. Midnight UTC on 8 September 2026 encodes as 01M1Z51000; 48 bits of milliseconds do not run out until the year 10889. Uniqueness inside a given millisecond rests on the 80 random bits alone - about 1.2 septillion values - and on nothing else being coordinated.

Working with them

There is no monotonic counter here. Ask for five at once and they usually share the same millisecond, so their first ten characters match and the order within that batch is random rather than sequential.

Frequently asked questions

ULID or UUID v7 - what is the difference?

Very little in structure: both put a 48-bit millisecond timestamp first. UUID v7 is an IETF standard in the familiar 36-character hyphenated hex form, while a ULID is 26 base32 characters and carries no version or variant bits, so it packs 80 random bits against v7's 74.

Can someone tell when a ULID was created?

Yes - the first ten characters decode straight back to a millisecond timestamp. That is the point of the format, but it does mean a ULID exposed in a public URL leaks the record's creation time.

Why are I, L, O and U missing from the alphabet?

Crockford base32 drops the characters people confuse when reading or typing an identifier aloud - I and L against 1, O against 0 - and excludes U so that accidental obscenities are less likely.