Developer Tools
ULID Generator
Create one or a batch of ULIDs — the 26-character, Crockford Base32 identifiers that embed a millisecond timestamp and sort by creation time. Bulk generate, copy in several formats, and decode the time hidden inside any ULID. All in your browser.
Decode a ULID
What makes this tool different
Sortable by time
Each ULID embeds a 48-bit millisecond timestamp, so IDs sort chronologically — unlike random UUIDs.
Bulk generation
Generate 1 to 25 ULIDs at once and copy them as plain text or a JSON array.
ULID decoder
Paste any ULID to decode its embedded timestamp into milliseconds and an ISO date.
ULID vs UUID
Compare ULID and UUID formats side by side and see when each is the better choice.
About this tool
ULID Generator: everything you need to know
Database primary keys need to be unique, and increasingly they need to be sortable by creation time. UUID v4 gives you uniqueness but no ordering; auto-increment integers give you ordering but leak data and fight with distributed systems. ULIDs sit in between: 128-bit unique IDs whose first 48 bits are a millisecond timestamp, so they sort naturally by time.
This ULID generator produces spec-compliant ULIDs entirely in your browser. Each ID carries a real millisecond timestamp and a cryptographically random 80-bit suffix, encoded in the standard 26-character Crockford Base32 alphabet. Generate a single ID or a batch of up to 25, and copy them as plain text or JSON.
The built-in decoder reverses the process. Paste any ULID and the tool extracts its 48-bit timestamp, showing you both raw milliseconds and a readable ISO date. This is useful when you inherit IDs from an existing system and want to know when each record was created.
Because ULIDs sort lexicographically in the same order they were created, they make excellent primary keys for MySQL, Postgres, and other databases that store them as CHAR(26). Indexes stay efficient, insert order matches row order, and the IDs remain globally unique across shards and services.
ULIDs are also URL-safe and case-insensitive, and they interoperate with libraries across every major language — Python, Go, Java, C#, PHP, and JavaScript — so a ULID created here can be parsed and validated anywhere in your stack.
Privacy is built into the design. Generation and decoding run entirely in your browser — no data is sent to any server. Open the DevTools Network tab and you will see zero requests.
FAQ
ULID Generator — frequently asked questions
What is a ULID?
A ULID (Universally Unique Lexicographically Sortable Identifier) is a 26-character, 128-bit identifier encoded in Crockford Base32. The first 48 bits are a millisecond timestamp, so ULIDs are naturally sortable by creation time, while remaining highly unique via a random 80-bit suffix.
What is a ULID vs UUID? Which should I use?
UUIDs (v4) are entirely random, so they do not carry time information and cannot be sorted by creation order. ULIDs embed a millisecond timestamp, making them lexicographically sortable and useful for database primary keys where insertion order matters. If ordering matters, choose ULID; for pure randomness, UUID v4.
Are ULIDs sortable? How does lexicographic ordering work?
Yes. Because the timestamp occupies the first 10 characters of the ULID and Crockford Base32 preserves byte order, lexicographically sorting ULIDs is the same as sorting them by creation time. Databases and indexes can order rows by the ULID itself.
How do I generate a ULID in Python / Go / Java / C# / PostgreSQL / PHP / JavaScript?
Most languages have official or community ULID libraries (python-ulid, oklog/ulid for Go, ulid-creator for Java and C#, the ulid extension for PostgreSQL). All follow the same spec, so a ULID generated here is valid and decodable in any of them.
Can I decode the timestamp from a ULID?
Yes. The first 10 characters encode a 48-bit Unix millisecond timestamp. This tool decodes it for you into milliseconds and an ISO 8601 date — a great way to verify an ID or recover when it was created.
What is the ULID regex pattern?
A ULID is 26 characters of Crockford Base32 (digits 0-9 plus letters A-Z excluding I, L, O, U). A common pattern is ^[0-9A-HJKMNP-TV-Z]{26}$. Use it for validation, or use this tool to validate and decode ULIDs.
Are ULIDs guaranteed unique?
Like UUIDs, ULIDs are practically unique. The random 80-bit suffix gives about 2^80 possibilities per millisecond, making collisions vanishingly unlikely. Monotonic ULIDs can also force incrementing suffixes when many are generated in the same millisecond.
What is Crockford Base32 encoding?
It is the encoding scheme ULIDs use: 32 characters (0-9 and A-Z, excluding I, L, O, U to avoid confusion) that map to 5 bits each. It keeps ULIDs compact, case-insensitive, and URL-friendly.
Is the ULID generator free and private?
Yes. OpenToolLab's ULID generator is completely free, requires no signup, and generates everything in your browser — no server requests at all.
Keep exploring