ULID Generator
Generate Universally Unique Lexicographically Sortable Identifiers (ULIDs) โ time-ordered, 128-bit, Crockford Base32 encoded.
Last updated: April 2026 ยท Runs in your browser ยท No sign-up
- 01KPYEQ26XS585CMV24F809J9S
ULID structure
A ULID is 26 characters: the first 10 encode a 48-bit timestamp (milliseconds since epoch), the last 16 encode 80 bits of randomness. Because the timestamp sorts lexicographically in Base32, ULIDs can be ordered by string comparison.
Good fits for ULID
- Primary keys where you want creation order without a separate timestamp column.
- Log IDs โ easier to scan than random hex.
- Distributed systems that need monotonic, conflict-free IDs.
Frequently Asked Questions
How is ULID different from UUID?
ULIDs are lexicographically sortable โ alphabetical order equals chronological order. Regular UUID v4s are random and can't be sorted meaningfully. ULIDs also use Crockford Base32 (26 chars, URL-safe) instead of hex with hyphens (36 chars).
When should I use ULID over UUID v7?
Both are time-ordered. UUID v7 follows RFC 9562 and plugs into any UUID-typed column. ULID is shorter and more readable. If you have UUID infrastructure, pick v7; for new projects, either works.
Can ULIDs collide?
Within the same millisecond, each ULID adds 80 random bits. Collision probability is negligible unless you generate 2^40+ IDs in a single millisecond on one machine.
Are they secret?
No. Because ULIDs embed a timestamp, they reveal creation time. Don't use them where time of creation is sensitive (e.g. password reset tokens).