ULID Generator

One input per line. Output is numbered to match the input order.
Pinned tools are listed in your favourites on the home page.Copies a link to this tool that carries your current input, so it opens ready to run.Gives you an iframe snippet for putting this tool on your own site.

ULID: 48-bit millisecond timestamp + 80-bit random, Crockford Base32. Lexicographically sortable.

Ctrl+Enter Run  · Ctrl+Shift+C Copy  · Esc Clear

Understand ULID Generator

Generates ULIDs — 26-character identifiers whose leading characters encode creation time, so they sort chronologically as plain text.

How it works

A ULID is 128 bits: a 48-bit millisecond timestamp followed by 80 random bits, written in Crockford Base32 as 10 timestamp characters and 16 random ones. Because that encoding preserves ordering, sorting the strings sorts by creation time, which is what makes ULIDs cheap as database keys — new rows append to the end of the index instead of scattering through it. The alphabet omits I, L, O, and U to keep transcription unambiguous.

When to use it

  • Primary keys for a table where you want time ordering without a central sequence.
  • Event, log, or message ids you will later want to range-scan by time.
  • Ids generated independently on several services that still need to sort together.
  • Anywhere you would reach for UUID v4 but care about index locality.
  • Identifiers a human may need to read from a screen, where the restricted alphabet helps.

Watch out for

  • Sortability holds only as far as the clock does. Monotonic mode keeps a batch ordered within a single millisecond by incrementing the random component, but two ULIDs minted on different machines are ordered by those machines' clocks — so a few milliseconds of drift reorders them.
  • The creation time is public. The first 10 characters decode straight back to a millisecond timestamp, so anyone holding a ULID knows when the record was made.
  • Crockford Base32 is case-insensitive on paper, but a database index comparing raw bytes is not. This tool always emits uppercase; store one casing consistently or sorting and equality will surprise you.
  • The random component is 80 bits against the 122 in a UUID v4, which only matters within a single millisecond — but it does mean a ULID is a weaker choice than a UUID v4 where the id has to be unguessable.

Frequently Asked Questions

Why is ULID better than UUID v4 for database primary keys?

UUID v4 is random, causing random B-tree index insertions and severe index fragmentation at scale. ULID is time-ordered — new records always insert at the end of the index, just like auto-increment integers but globally unique.

What is monotonic mode in ULID?

When several ULIDs land in the same millisecond, monotonic mode increments the previous random component by one instead of drawing fresh random bits. That guarantees strict lexicographic order inside a millisecond, which plain random ULIDs cannot. This generator uses monotonic mode by default when you request a batch.

Is ULID case-insensitive?

Yes — ULID uses Crockford Base32 (0-9, A-Z excluding I, L, O, U) which is case-insensitive by design. 01AN4Z07BY is the same as 01an4z07by. The alphabet also avoids visually confusing characters.

How to Use ULID Generator

  1. Paste or type your input in the input area above.
  2. The tool processes your input automatically or click Run.
  3. Copy or download the result using the action buttons.
  4. Use Ctrl+Enter to run quickly from the keyboard.