Generate ULID

Generate a 26-character ULID with a sortable millisecond timestamp prefix.

freeworks offlinenothing uploaded
ToolULID Generator
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

A ULID encodes a 48-bit millisecond timestamp followed by 80 random bits in Crockford Base32. Monotonic mode increments the random portion for multiple IDs in one millisecond.

  • The timestamp prefix gives broad lexical chronology.
  • The random suffix supports distributed generation.

Worked example

Single ULID
Generate one lexicographically sortable ULID
Input
											1
										
Output
												01M0WF84H4ANFVR25MZ9845S82
											

When to use this

Event stores, distributed keys, and log viewers generate ULIDs.

Edge cases

  • The 48-bit timestamp range can overflow.
  • Monotonic mode can exhaust its suffix within one millisecond.
  • Crockford Base32 omits ambiguous I, L, O, and U.

References