ULID Generator

Generate sortable, URL-safe ULID identifiers.

Free ULID generator — create 26-character, lexicographically sortable, URL-safe identifiers using Crockford base32. Runs entirely in your browser, nothing is uploaded. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is a ULID?

A ULID is a 26-character identifier made of a 48-bit timestamp followed by 80 bits of randomness, encoded in Crockford base32. It is lexicographically sortable by time, case-insensitive, and URL-safe — a popular alternative to UUIDs.

URL-safe ULID generator

A ULID (Universally Unique Lexicographically Sortable Identifier) is a 26-character identifier designed as a friendlier alternative to the UUID. It combines a 48-bit millisecond timestamp with 80 bits of randomness and encodes the result in Crockford base32, producing IDs that sort by creation time, contain no hyphens, and are safe to drop straight into URLs, filenames and log lines.

Structure of a ULID

The 128 bits of a ULID are split into two parts:

  1. Timestamp (first 10 characters, 48 bits) — milliseconds since the Unix epoch. This gives coverage until the year 10889, so practical overflow is not a concern.
  2. Randomness (last 16 characters, 80 bits) — generated by the browser’s crypto.getRandomValues, making collisions within the same millisecond statistically negligible (2^80 possible values).

The Crockford base32 alphabet is 0-9A-Z minus I, L, O and U — chosen specifically to avoid the visual ambiguity of those letters with 0 and 1. Because the encoding preserves byte order, sorting ULID strings alphabetically is equivalent to sorting by creation time.

PropertyValue
Total length26 characters
Timestamp bits48 (first 10 chars)
Random bits80 (last 16 chars)
EncodingCrockford base32
Case-sensitiveNo
Max timestampYear 10889

How this generator works

When you click Generate, the tool reads the current time via Date.now() and draws 80 bits from crypto.getRandomValues. When generating a batch of more than one ULID, each subsequent ULID’s timestamp is incremented by one millisecond so the entire batch is strictly monotonic — no two IDs share a timestamp, which guarantees sort order even without looking at the random tail.

Lowercase output is the same underlying value; Crockford base32 is case-insensitive.

ULID vs UUID: choosing the right one

FeatureULIDUUID v4UUID v7
Length26 chars36 chars (with hyphens)36 chars
SortableYes (by time)NoYes (by time)
URL-safeYes (no hyphens)Only after stripping hyphensOnly after stripping hyphens
FormatCrockford base32 stringHex with hyphensHex with hyphens
Collision riskNegligibleNegligibleNegligible

Choose ULID when: you want sortable primary keys, compact identifiers in URLs, or log-line IDs that are human-readable and time-ordered.

Choose UUID when: you need compatibility with a library or database driver that expects the standard hyphenated hex format, or your team has existing UUID infrastructure.

UUID v7 has overlap with ULID — both are time-sortable — but UUID v7 keeps the familiar hex-with-hyphens shape at the cost of being slightly longer and less URL-friendly.

Using ULIDs as database primary keys

The time-sorted prefix makes ULIDs effective B-tree primary keys. Random UUIDs cause page splits on insert because each new key lands at a random position in the index. ULIDs always append near the end of the index (since timestamps increase monotonically), keeping insert performance more predictable and index fragmentation lower — similar to auto-increment integers but globally unique and without a single sequence bottleneck.

Generation happens entirely in your browser. The timestamp and random bits never leave your device.