What it does
This tool generates ULIDs in your browser. A ULID is a 128-bit identifier, like a UUID, but it is written as 26 characters and it sorts by the time it was created. That makes ULIDs a good fit for database primary keys, event and log IDs, file names and anything else you want to list in creation order without a separate timestamp column.
A ULID has two parts:
- Timestamp (first 10 characters): milliseconds since the Unix epoch, 48 bits. It runs until the year 10889.
- Randomness (last 16 characters): 80 bits from the browser’s cryptographic random number generator.
ULIDs use Crockford’s Base32 alphabet 0123456789ABCDEFGHJKMNPQRSTVWXYZ. It leaves out I, L, O and U so IDs are easy to read aloud and hard to mistype, and it contains no characters that need escaping in URLs.
How to use
- Choose how many IDs you need, from 1 to 1000.
- Turn on Monotonic if the IDs must keep their order even when several are created in the same millisecond. The random part is then incremented by one for each new ID.
- Turn on Lowercase if your system stores IDs in lowercase. ULIDs are case-insensitive, and the canonical form is uppercase.
- Copy the list or download it as a text file. Press generate again for a fresh batch.
Example
01ARZ3NDEKTSV4RRFFQ69G5FAV
Here 01ARZ3NDEK is the timestamp 1469922850259 (2016-07-30 23:54:10.259 UTC), and TSV4RRFFQ69G5FAV is the random part. Two ULIDs created a second apart share their first few characters, which is why a plain string sort puts them in time order.
ULID compared with UUID
A random UUID v4 spreads new rows across a B-tree index, which slows inserts on large tables. ULIDs are mostly increasing, so new rows land at the end of the index, as they do with an auto-increment integer, while still being unique across machines without coordination. The trade-off is that a ULID reveals roughly when it was created. If that matters, use a UUID v4.
FAQ
› What is a ULID?
A ULID (Universally Unique Lexicographically Sortable Identifier) is a 128-bit ID written as 26 Crockford Base32 characters. The first 10 characters encode a millisecond timestamp and the last 16 are random.
› ULID or UUID: which should I use?
Use a ULID when you want IDs that sort by creation time, for example as database keys or log IDs. Use UUID v4 when the ID must not reveal when it was created. UUID v7 is a standard alternative that is also time-ordered.
› What does monotonic mode do?
IDs created in the same millisecond normally get independent random parts, so their order within that millisecond is random. In monotonic mode the random part is incremented by one instead, so every ID in the batch sorts strictly after the previous one.
› Are the IDs generated securely?
Yes. The random part comes from the browser's cryptographic random number generator, and nothing is sent to a server.