ULID Generator
Each ULID is 26 Crockford base32 characters. The first part encodes Unix time in milliseconds. The rest is random. IDs sort by time.
Rated 4.7 out of 5 based on 403 reviews
How to generate ULIDs
- Set how many ULIDs to print, from 1 to 1000.
- Leave Upper case on for the usual Crockford look, or turn it off for lowercase.
- Generate. Each line is 26 characters. Earlier IDs from earlier milliseconds sort first.
- Use a UUID v7 when the receiving system requires a UUID, not a ULID string.
ULID
Universally Unique Lexicographically Sortable Identifier
| Length | 26 Crockford base32 characters |
|---|---|
| Time field | 48-bit Unix time in milliseconds |
| Random field | 80 bits from Web Crypto |
| Alphabet | Crockford base32, no I, L, O, or U |
| Sort | Lexicographic order matches time order |
| Not UUID v7 | Different layout and alphabet than RFC 9562 UUID version 7 |
26 Crockford base32 characters
A ULID is always 26 characters from Crockford base32: 0123456789ABCDEFGHJKMNPQRSTVWXYZ. The letters I, L, O, and U are omitted so readers mix them up less often. The canonical form is uppercase. This page can print lowercase if you uncheck Upper case. Both forms encode the same bits. Do not mix case in a system that compares strings byte for byte unless you normalize first.
48-bit time plus 80-bit random
The first 10 characters encode 48 bits of Unix time in milliseconds. The last 16 characters encode 80 bits of randomness from Web Crypto. Two ULIDs created in the same millisecond still differ in the random half with very high probability. The time field is wall-clock Date.now() in this tab, not a NTP-certified timestamp.
Sortable by time, not UUID v7
String sort of ULIDs follows creation time. That is handy in logs and in indexes that use the ID as a key. UUID version 7 is also time-ordered, but it is still a UUID: 128 bits, hex, hyphens, version nibble. A ULID will fail a UUID parser. Generate v7 on the UUID page when the API says UUID. Generate ULID here when the API says ULID. For a short non-time ID, use NanoID.
An identifier, not a secret
Anyone who sees a ULID can read an approximate creation millisecond from the prefix. Do not use a ULID as a password. Do not assume hiding a record is enough if the ID leaks the time you created it.
Generated in this browser
No network call mints the ID. Count can be 1000 lines. Clock skew on the device will show up in the time prefix. If the clock jumps backward, later IDs can sort before earlier ones from a previous session. That is a property of using local time, not a bug in Crockford encoding.