ULID Generator
Generate sortable ULIDs, read the timestamp back out of one, and see how they compare with UUID v4 as a primary key.
Increments the random half instead of drawing a new one.
Read a ULID
ULID and UUID v4
| ULID | UUID v4 | |
|---|---|---|
| Length | 26 characters | 36 characters |
| Sortable by time | Yes | No |
| Bits of randomness | 80 | 122 |
| Case sensitive | No | No |
| Reveals creation time | Yes | No |
Files are processed in your browser and are never uploaded to a server.
How to use
Free to use with no sign-up, no install and no usage limit.
A ULID is 26 characters: 48 bits of millisecond timestamp followed by 80 bits of randomness, written in Crockford Base32. Sorting the strings sorts by creation time, which is the whole point of the format.
That matters most for primary keys. A UUID v4 lands at a random place in the index every time, so inserts scatter across pages; a ULID appends near the end and keeps the index tight.
The alphabet leaves out I, L, O and U. Nothing reads as a different character when someone copies an ID off a screen or reads it aloud, and there is no profanity to stumble into.
Monotonic mode increments the random half instead of drawing a new one, so several IDs made in the same millisecond still come out in order. Without it, two IDs from the same millisecond sort arbitrarily.
Paste an existing ULID below to read its timestamp back. The first ten characters are the time, and nothing else is needed to recover it.
The randomness comes from your browser’s cryptographic generator. Nothing is requested from a server and nothing is sent to one.