🔢 ULID Generator
Generate ULIDs, 26-character, time-sortable identifiers (48-bit timestamp + 80-bit randomness), single or in bulk, and decode them too.
ULID: 48-bit timestamp + 80-bit randomness in Crockford base32, lexicographically sortable, 26 characters. 🔒 Generated entirely in your browser.
How the ulid generator works
A ULID packs a 48-bit millisecond timestamp and 80 bits of cryptographically-secure randomness into 26 Crockford base32 characters, the first 10 characters encode the time, the last 16 the randomness. Because the timestamp leads and base32 preserves ordering, sorting ULIDs as plain text puts them in creation order, which is why they work well as database keys and log IDs while remaining globally unique. The 80 random bits mean that even two ULIDs generated in the same millisecond are overwhelmingly unlikely to collide. Switch tabs to generate UUID v4/v7 or NanoID, or decode an existing ULID to read its timestamp.
ULIDs are an alternative to UUID v7: same time-sortable benefit, but shorter and case-insensitive in Crockford base32. All randomness comes from crypto.getRandomValues.
Frequently asked questions
What is a ULID?
A Universally Unique Lexicographically Sortable Identifier: a 128-bit ID encoded as 26 Crockford base32 characters, made of a 48-bit millisecond timestamp followed by 80 random bits. It sorts in creation order.
How is a ULID different from a UUID?
A ULID is shorter (26 vs 36 characters), uses case-insensitive base32 instead of hex, and is time-sortable by design. UUID v7 offers the same sortability in the standard UUID format.
Are ULIDs good for database keys?
Yes, the leading timestamp gives good index locality (new rows cluster together), avoiding the index fragmentation that random UUID v4 keys cause.
Can I extract the time from a ULID?
Yes, the Decode tab reads the first 10 characters back into the millisecond timestamp and shows it as a date.
What is Crockford base32 and why does ULID use it?
It is a base-32 alphabet that excludes the easily-confused letters I, L, O and U, so a ULID is safe to read aloud or type and is case-insensitive. Encoding 128 bits in base32 also takes only 26 characters, ten fewer than a UUID's 36, while staying human-friendly.
How far into the future can a ULID timestamp go?
The 48-bit millisecond field can represent dates until the year 10889, so it will not run out in any practical sense. Every ULID stamps the exact millisecond it was created, which is what makes the decode able to recover a real date.
Should I use ULID or UUID v7?
Both are time-sortable and serve the same purpose. UUID v7 fits systems and columns that already expect the standard 36-character UUID format, while ULID is shorter and case-insensitive. Choose ULID when compactness and readability matter, UUID v7 when UUID compatibility does.
What happens when two ULIDs are generated in the same millisecond?
They share the same 48-bit timestamp, so their ordering falls to the 80 random bits, which means IDs made in the same millisecond are not guaranteed to sort in exact creation order. The original ULID spec offers a monotonic mode that increments the random part within a millisecond to preserve order; this generator draws fresh randomness each time, which is standard and collision-safe.
Does a ULID reveal when it was created?
Yes, the first 10 characters encode the creation time to the millisecond, and anyone can decode it (the Decode tab does exactly that). That is useful for debugging and sorting, but it means a ULID is not opaque: if the creation time is sensitive, use a fully random identifier like UUID v4 or a NanoID instead.
Is it generated securely and locally?
Yes, the random portion uses crypto.getRandomValues, and everything runs in your browser.