ULID Generator
Encoded Timestamp
-
Date/Time
-
How to use this ULID generator
- A new ULID generates automatically when the page loads.
- Click "Generate New" for another one anytime.
- Click the value to select it, then copy.
What is a ULID?
A Universally Unique Lexicographically Sortable Identifier combines a 48-bit timestamp with 80 bits of randomness, encoded in Crockford's Base32. Unlike a UUID, ULIDs generated later always sort after earlier ones as plain strings.
Why use a ULID instead of a UUID?
Because ULIDs are sortable by creation time, they work better as database primary keys for indexing performance, while still being effectively collision-free like a UUID.
Can I extract the creation time from a ULID?
Yes — the first 10 characters encode the millisecond timestamp, which this tool decodes and displays for you automatically.
Is a ULID case-sensitive?
ULIDs are conventionally uppercase, but Crockford's Base32 is designed to decode correctly regardless of case.
Why Crockford's Base32, specifically, rather than standard Base32 or Base64
ULIDs use a specific alphabet called Crockford's Base32 rather than the more common standard Base32 or Base64 encodings, and the choice is deliberate rather than arbitrary. Crockford's alphabet excludes the letters I, L, O, and U specifically to prevent visual confusion — I and L can look nearly identical to the digit 1 in many fonts, O looks like the digit 0, and U was excluded to avoid accidentally spelling profanity when characters are combined randomly. It's also case-insensitive by design, decoding correctly whether entered as uppercase or lowercase, and it avoids the "+" and "/" characters Base64 uses, both of which cause problems in URLs as covered in other tools on this site. The result is an identifier that's meaningfully safer to read aloud, type manually, or transcribe by hand without introducing subtle errors — a real, practical advantage standard Base32 and Base64 don't offer.
How ULIDs stay sortable even for multiple IDs generated in the same millisecond
A ULID's first 48 bits encode a millisecond-precision timestamp, but generating more than one ULID within that exact same millisecond raises an obvious question: what determines their relative order? This is handled by the remaining 80 bits of randomness — when multiple ULIDs share an identical timestamp, sort order falls back to comparing those random bits directly as plain numbers. Some ULID implementations additionally offer a "monotonic" generation mode, which deliberately increments the random portion by a small amount for each subsequent ULID generated within the same millisecond, guaranteeing strict, correct sort order even for IDs created in rapid succession on the same machine — a meaningful practical concern for very high-throughput systems generating many IDs per millisecond.
ULID versus the newer UUIDv7 — two solutions to the same underlying problem
ULID and UUIDv7 (mentioned in this site's UUID generator tool) both solve essentially the same problem — combining a sortable timestamp prefix with random bits for uniqueness — but they emerged through different paths and standardization efforts. ULID came first as a community-driven specification, gaining adoption particularly in the JavaScript and web development ecosystem specifically because of its sortability advantage over standard random UUIDs. UUIDv7 arrived later as a newer, officially standardized addition to the formal UUID specification itself, offering essentially the same core sortable-timestamp-plus-randomness idea but with the benefit of being a recognized, official UUID version with growing native support directly in databases and standard libraries. Choosing between them today often comes down to ecosystem fit — UUIDv7 for projects that want to stay within the strictly standardized UUID format, ULID for projects that value its more compact, distinctly non-hyphenated string representation and its mature, already-established tooling.
The privacy tradeoff of an identifier that reveals its own creation time
A sortable identifier's core advantage — encoding creation time directly and visibly within the ID itself — is also a genuine information disclosure worth actively considering before adopting one as a public-facing identifier. Any ULID exposed to end users, whether in a URL, an API response, or an exported file, reveals exactly when that specific record was created down to the millisecond, information a purely random UUID would never leak. This might be entirely harmless for many kinds of records, but for certain sensitive use cases — like sequential order IDs revealing exact business transaction volume and timing to competitors, or user account IDs revealing precisely when a specific account was created — this leakage is worth deliberately evaluating before choosing ULID for anything that will actually be visible to end users, not just used internally within a database.
Limitations of this tool
This tool generates standard, single-shot ULIDs using your browser's cryptographically secure random number generator, decoding and displaying the embedded timestamp for each one — it doesn't implement the monotonic generation mode described above for guaranteeing strict order within the same millisecond, since that requires tracking state across multiple calls rather than generating each ULID independently. It also doesn't validate or decode a ULID string you already have from elsewhere — it generates new ones and shows you their own decoded timestamp, rather than acting as a general-purpose ULID parser for arbitrary existing values.