48 bits of time, 80 bits of random
Generate a ULID
A ULID sorts by creation time and still has a random tail, so two ids made in the same millisecond are not the same. It is an identifier, not a secret.
The first 10 characters encode milliseconds since 1970 in Crockford base32. The next 16 characters encode 80 bits from crypto.getRandomValues. Crockford's alphabet omits I, L, O, and U so the id is harder to misread. This page does not monotonic-increment the random part when several ids share a millisecond. It also does not decode an existing ULID back into the time it was minted.
Identifiers are created in this tab and forgotten when you leave.
This tool runs in your browser. Turn on JavaScript to use it.
How to read the shape
The sample shows the length. Generate a new one for real use. The time prefix changes as the clock moves.
- Length
- 26 characters
- Time
- First 10 characters
- Random
- Last 16 characters
How to use it
- 1Choose how many you need, up to 20.
- 2Generate, then copy one line or the list.
- 3Treat the result as an id, not as a password.
Good to know
- The clock comes from this device.
- Same-millisecond ids are not forced into order.
- The alphabet is upper-case Crockford base32.
Questions
Is a ULID a UUID?
No. Both can identify a row. A ULID embeds time and uses a different alphabet.
Can someone guess the next one?
The time prefix is predictable. The random tail is not. Do not use it as a secret.
Why are there no I, L, O, or U?
Crockford base32 leaves them out so they are not confused with digits.
Related tools
- Generate UUID version 4
A version 4 UUID is a random id in a fixed shape. Databases use it when they do not want a guessable counter. It is not a secret and not a checksum.
- Generate a random token
A token is a string of random bits. This page draws 8 to 64 bytes and prints hex or base64url, the form often used in URLs.
- Convert a Unix timestamp
Unix time counts seconds from the start of 1970 in UTC. JavaScript often counts milliseconds instead. Mixing the two shifts the date by about thirty years, or by a factor of a thousand.