ULID Generator
Sortable ULIDs from the crypto RNG, and decode a ULID's timestamp.
About this tool
Choose how many ULIDs to make, up to 1,000, and generate them. Monotonic mode guarantees each ID sorts after the previous one even within the same millisecond, and lowercase output is available. Paste any ULID into the decoder to read its timestamp in UTC and local time and see it as a UUID.
What a ULID is and when to use one
A ULID, a Universally Unique Lexicographically Sortable Identifier, packs 128 bits into 26 characters. The first 48 bits are the creation time in milliseconds since 1970, and the remaining 80 bits are random. They're written in Crockford's base32, which uses the digits and letters except I, L, O and U to avoid confusion when IDs are read aloud or typed. Because the timestamp comes first, sorting ULIDs as plain text sorts them by creation time. That's their main advantage over random UUID version 4s: new rows land at the end of a database index rather than at random positions, which keeps B-tree indexes compact and inserts fast, and IDs in logs line up with time. With 80 random bits per millisecond, collisions are practically impossible. Monotonic generation increments the random part when several IDs are made in the same millisecond, so they still sort in order. A ULID is the same size as a UUID, so it can be stored in a UUID column; the decoder shows the equivalent. The specification's example, 01ARZ3NDEKTSV4RRFFQ69G5FAV, decodes to 30 July 2016. Honest limits: a ULID reveals when it was created, which may matter for privacy or security, and UUID version 7 now offers a similar time-ordered design in standard UUID format. The UUID generator makes classic UUIDs and the timestamp converter works with Unix times.
Frequently asked questions
What is the difference between a ULID and a UUID?
Both are 128 bits, but a ULID starts with a timestamp, so it sorts by creation time, and it's written in 26 base32 characters instead of 36 hex characters.
Are ULIDs secure random?
The random part here comes from crypto.getRandomValues. The timestamp part is predictable, so don't use ULIDs as secret tokens.
Can I get the date from a ULID?
Yes. Paste it into the decoder; the first 10 characters hold the creation time in milliseconds.
Is my data saved?
No. IDs are generated in your browser and nothing is stored or sent.