Generate ULID
A 128-bit identifier encoded as 26 Crockford base32 characters — the first 48 bits are a Unix-millisecond timestamp, the remaining 80 bits are random, and the chosen alphabet drops look-alike I, L, O, U.
Generated · 0 IDs
Options
This ID
Collision
The timestamp separates different milliseconds. Inside one millisecond, monotonic mode increments instead of resampling, so one generator stays unique while independent generators depend on the 80-bit random tail.
Validate and parse ULID
Paste an ID
About ULID
Use when: you want a compact, time-sortable ID with the same entropy as a UUID. Crockford base32 keeps it URL-safe and avoids the look-alikes I, L, O, U.
Avoid when: you need strict UUID compatibility for an existing column or library — use UUID v7 instead.
How it is generated
A ULID is 128 bits encoded as 26 characters of Crockford base32. The alphabet skips the look-alike letters I, L, O, and U on purpose so transcription is safe.
The first 10 characters are a Unix-millisecond timestamp; the last 16 characters are 80 bits of randomness. Because the timestamp leads, ULIDs sort by creation time as plain strings.
Monotonic mode handles the same-millisecond case by incrementing the random tail as a big-endian integer instead of resampling, so two ULIDs minted within one ms still come out strictly ordered.
- 01 Read Date.now(). If the clock went backwards (monotonic mode), clamp it to the previous timestamp.
- 02 Encode the 48-bit timestamp as 10 Crockford base32 characters, top two bits forced to 0 so the result fits in 50 encoded bits.
- 03 If same-ms as the previous ULID and monotonic mode is on, increment the previous 10-byte random tail as a big-endian integer. Otherwise read 10 fresh bytes from crypto.getRandomValues.
- 04 Encode those 10 bytes (80 bits) as 16 Crockford base32 characters.
- 05 Concatenate to get a 26-character string. Apply the chosen case (upper by spec, lower as display only).
01HZAB6JXG VK9R2QXTYW1P3M5Z
└────┬───┘ └───────┬──────┘
│ └── 80 random bits (16 chars). Monotonic mode: counter+1.
└──────────────── 48-bit Unix-ms timestamp (10 chars, top 2 bits = 0)
Alphabet (Crockford base32): 0123456789ABCDEFGHJKMNPQRSTVWXYZ
(skips I, L, O, U) All of this runs in your browser. Random bytes come from crypto.getRandomValues, timestamps come from the system clock, and nothing about the generated ID leaves the tab.