Sortable identifiers

ULID Generator

Generate ULIDs online: 26-character, lexicographically sortable identifiers with a millisecond timestamp, created privately in your browser.

Your ULID01ARZ3NDEKTSV4RRFFQ69G5FAV

Encodes 2016-07-30T23:54:10.259Z

A ULID is a 128-bit identifier like a UUID, but encoded as 26 Crockford Base32 characters with a millisecond timestamp at the front. That makes ULIDs sort lexicographically by creation time while staying compact and URL-safe.

Key takeaways

  • ULIDs are 26 characters and sort by creation time.
  • The first 10 characters encode a 48-bit millisecond timestamp.
  • Use Crockford Base32, which avoids ambiguous characters (I, L, O, U).

What a ULID is

A ULID (Universally Unique Lexicographically Sortable Identifier) packs the same 128 bits as a UUID into a shorter, case-insensitive Base32 string. The leading 48 bits are a Unix millisecond timestamp and the remaining 80 bits are random, so newer ULIDs sort after older ones as plain text.

That ordering is the whole appeal: ULIDs work well as database keys, log identifiers and cursor values where you want rough time ordering without a separate timestamp column.

01ARZ3NDEK TSV4RRFFQ69G5FAV
^^^^^^^^^^ 48-bit timestamp (10 chars)
           ^^^^^^^^^^^^^^^^ 80-bit randomness (16 chars)

ULID vs UUID v7

Both ULID and UUID v7 put a timestamp first to gain sortability. ULID is shorter (26 vs 36 characters) and Base32-readable, while UUID v7 stays inside the UUID standard with native database types and universal tooling. If standardization matters, prefer UUID v7; if a compact sortable string matters most, ULID is a good fit.

FAQ

ULID Generator questions

Are ULIDs sortable?

Yes. Because the timestamp leads the value, ULIDs sort lexicographically in the same order they were created, which is useful for database keys and logs.

How long is a ULID?

A ULID is 26 characters using Crockford Base32, encoding the same 128 bits as a UUID in a shorter, URL-safe form.

Is a ULID the same as a UUID?

Both are 128-bit identifiers, but ULID uses a sortable Base32 text encoding, while UUID uses hexadecimal with hyphens. UUID v7 offers similar time ordering within the UUID standard.

ULID Generator - Sortable, Time-Based IDs Online