ULID generator

Create time-sortable unique IDs that are shorter than UUIDs and safe in URLs.

Tier 0 · browser · unlimited
ULIDs
 

What a ULID is

A ULID (Universally Unique Lexicographically Sortable Identifier) packs the same 128 bits as a UUID into 26 characters, like 01ARYZ6S41TSV4RRFFQ69G5FAV. The first 10 characters are the creation time in milliseconds, the other 16 are random. Because the time comes first and the alphabet is ordered, sorting ULIDs as plain strings sorts them by creation time, which keeps database indexes tidy and makes logs easy to scan.

The alphabet is Crockford's Base32: digits and capital letters without I, L, O and U, so IDs are case-insensitive, avoid look-alike characters and need no escaping in URLs.

Worked example

The ULID specification's example time, 1469918176385 ms (30 July 2016, 22:36:16.385 UTC), encodes to the prefix 01ARYZ6S41. Every ULID made in that millisecond starts with those ten characters; the remaining sixteen are random.

ULID or UUID v7?

Both are time-ordered. UUID v7 is an IETF standard (RFC 9562) and fits uuid database columns; ULID is shorter as text and URL-friendly. Choose by what your stack supports.

How this works

For each ID the page takes the current Unix time in milliseconds, writes it as 10 Crockford Base32 characters (5 bits each, most significant first), then draws 10 bytes from crypto.getRandomValues, the browser's secure random source, and writes those 80 bits as 16 more characters. The result follows the ULID specification. IDs are generated only in your browser, when the page loads and each time you click Generate.

Frequently asked

Are ULIDs sortable?

Yes. Sorting them as strings orders them by creation time, to the millisecond.

Is a ULID the same size as a UUID?

Yes, both are 128 bits. A ULID is written in 26 characters instead of 36.

Are ULIDs case-sensitive?

No. Crockford Base32 is case-insensitive; the canonical form is uppercase.

Do ULIDs expose when they were made?

Yes. The first 10 characters are the creation time, so don't use them where that is sensitive.

Sources

Reviewed Oct 17, 2026 · test vectors fixtures/dev/ulid-generator/