ULID Generator
Free ULID generator: make up to 1,000 sortable ULIDs with monotonic ordering, create them for a past date and time, and decode any ULID to its timestamp.
How to use ULID Generator
- 1Set how many ULIDs you need, and turn Monotonic and lowercase on or off.
- 2Optionally pick a date and time to generate ULIDs for that instant, then choose the output layout.
- 3Copy or download the list, or paste a ULID into the decoder to read its timestamp.
What makes it better
- Up to 1,000 ULIDs per batch
- Monotonic mode keeps IDs from the same millisecond in order
- Generate for any date and time, for back-filling sortable data
- Decoder shows UTC and local time plus the random part
- Lines, JSON array or comma separated, upper or lower case
About ULID Generator
ULID Generator creates Universally Unique Lexicographically Sortable Identifiers: a 48-bit millisecond timestamp followed by 80 random bits, written as 26 Crockford Base32 characters. Generate up to 1,000 at once, keep them in order within the same millisecond, output lines, a JSON array or a comma list, or build ULIDs for a past date. A decoder shows the time and the random part of any ULID you paste.
Common uses
- Use primary keys that sort by creation time without a separate timestamp column.
- Back-fill historical records with IDs that sort correctly for the date they belong to.
- Find out when a record was created by decoding the ULID in a log line.
- Create a list of ordered test IDs for fixtures and database seeds.
Example
Input
Timestamp 1469918176385 (2016-07-30 22:36:16.385 UTC) with random part TSV4RRFFQ69G5FAV
Result
01ARYZ6S41TSV4RRFFQ69G5FAV
Good to know
- A ULID reveals its creation time to the millisecond, so do not use it where that is sensitive. It is an identifier, not a secret or a token.
- Monotonic mode adds one to the random part for IDs created in the same millisecond, which makes the next ID guessable from the previous one.
- IDs generated for a chosen date use that date's timestamp with fresh randomness, so they sort by that time but are not real events at that moment.
ULID Generator FAQ
What is a ULID and how is it different from a UUID?
A ULID is a 128-bit identifier like a UUID, but it starts with a millisecond timestamp, so IDs sort by creation time, and it is written in 26 characters instead of 36.
What does the monotonic option do?
When two ULIDs are created in the same millisecond, the second reuses that timestamp and adds one to the random part of the first. That keeps them in the order they were made even inside one millisecond.
How can I get the date out of a ULID?
Paste it into the decoder. The first 10 characters are the timestamp, shown as a UTC ISO date, in your local time and as Unix milliseconds. The last 16 characters are the random part.
Why does a ULID never start with 8 or higher?
The 128 bits are written in 26 characters of five bits each, which is 130 bits, so the first character holds only three bits of data. Its largest legal value is 7, and anything higher is reported as an overflow.
Are ULIDs case sensitive?
No. The canonical form is upper case, but lower case is read the same way, and the alphabet leaves out I, L, O and U so the characters are not mistaken for digits.