Skip to main content
CalcChef

ULID Generator

Generate 1 to 500 ULIDs, 26-character IDs that sort by creation time, in upper or lower case, and decode any ULID to the date it was made. How it works

Use the ULID Generator

ULID — Universally Unique Lexicographically Sortable Identifier. IDs made in the same millisecond keep their order.

Generate a ULID above to get started.

Decode an existing ULID

About the ULID Generator

A ULID is a 26-character ID: 10 characters of millisecond timestamp followed by 16 random characters, written in Crockford base32 (the digits and the letters A to Z without I, L, O and U). The time comes first, so a list of ULIDs sorted as plain text is in creation order. This ULID generator makes 1 to 500 at a time and decodes an existing ULID back to the moment it was made.

How to use this tool

  1. Set Quantity from 1 to 500 and press Generate.
  2. Open Options to switch between UPPER and lower case, and to choose what Copy All puts between the IDs: a newline, comma, space or tab.
  3. To read an ID, paste it into Decode an existing ULID and press Decode or Enter.

Frequently asked questions

What is the difference between a ULID and a UUID?
Both hold 128 bits. A UUID is written as 36 hex characters with hyphens, a ULID as 26 base32 characters with none. A random UUID v4 has no order, while a ULID starts with its creation time. UUID v7 also puts a millisecond timestamp first but keeps the UUID text form, which fits a database column of type uuid; the UUID v7 Generator makes those.
How do I get the timestamp from a ULID?
The first 10 characters are the milliseconds since 1 January 1970 UTC in base 32. Paste the ULID into the decoder: 01ARZ3NDEKTSV4RRFFQ69G5FAV, the example in the ULID spec, gives 1,469,922,850,259 ms, which is 2016-07-30T23:54:10.259Z. Lower-case input gives the same result.
Do ULIDs made in the same millisecond stay in order?
Yes, for IDs made on this page. Most of a batch falls in one millisecond, and each of those IDs is the previous random part plus 1, so a random part ending in 0ZZZ is followed by one ending in 1000. ULIDs made on two different machines in the same millisecond have no order between them.
Why are there no I, L, O or U in a ULID?
Crockford base32 leaves out I and L, which look like 1, and O, which looks like 0, and drops U to avoid spelling words by accident. Crockford lets a decoder read I and L as 1 and O as 0; the decoder here rejects them instead, so check a hand-typed ID.
Can a ULID be used as a secret token?
No. The first 10 characters tell anyone when it was made, and inside a batch only the first ID of each millisecond gets fresh random bits. The others are that value plus 1, plus 2 and so on, so one ID gives away its neighbours.

Related Tools

View all tools