ULID Generator
Generate ULIDs (Universally Unique Lexicographically Sortable Identifiers). 26 characters, URL-safe, time-sortable, and compatible with UUIDs.
Generate ULID
Create sortable unique identifiers
Generated ULIDs
Click "Generate ULIDs" to create unique identifiers
Frequently Asked Questions
What is a ULID?
A 26-character identifier that packs a 48-bit millisecond timestamp and 80 bits of randomness, so IDs sort by creation time.
Why choose ULID over UUID?
ULIDs sort lexicographically by time, are shorter, and use URL-safe Crockford base32 with no hyphens to manage.
Can I trust the ordering?
Across different milliseconds, yes. Within the same millisecond, order between two ULIDs is not guaranteed.
Do ULIDs work where UUIDs are used?
They drop into most string columns and APIs, and converting between ULID and UUID is straightforward when both formats must coexist.
How long is a ULID and what characters does it use?
Every ULID is exactly 26 characters using Crockford Base32, which includes digits 0-9 and letters A-Z except I, L, O, and U. This fixed length keeps database column sizes predictable and avoids ambiguous characters when IDs are read aloud or typed manually.
Are ULIDs safe to use in URLs and filenames?
Yes. ULIDs contain only uppercase letters and digits with no hyphens, slashes, or symbols, so they pass through URLs, path segments, and filenames without percent-encoding. The 26-character length also fits comfortably in route patterns and log lines.
How many ULIDs can be generated in the same millisecond?
The 80-bit random section provides roughly 2^80 values per millisecond, making collisions practically impossible. If your application creates several IDs within one millisecond, use monotonic mode, which increments the random part by one so sort order is preserved.
How do I read the timestamp from a ULID?
The first 10 characters encode the Unix timestamp in milliseconds, while the remaining 16 characters are random. Decode those 10 characters from Crockford Base32 into a number, then convert it with any Unix timestamp tool to get the exact creation time.
ULID Structure
Each ULID consists of two parts: timestamp and randomness
01ARZ3NDEKTSV4RRFFQ69G5FAV
Example: This ULID was generated at a specific millisecond and includes 80 bits of randomness
Timestamp (48 bits)
Milliseconds since Unix epoch (1970-01-01). Provides time-ordered sorting and lasts until 10889 AD.
Randomness (80 bits)
Cryptographically secure random value. Provides 1.21 quintillion unique IDs per millisecond.
Technical Specifications
ULID is designed to be sortable, URL-safe, and compatible with UUIDs
Features
- Cryptographically secure randomness
- Client-side generation only
- Lexicographically sortable
- No special characters (URL-safe)
Specifications
- 26 characters (128 bits)
- Crockford's Base32 encoding
- 48-bit timestamp + 80-bit randomness
- 1.21M IDs per millisecond
References & Resources
-
ULID Specification - GitHub
The sortable ULID specification — timestamp-prefixed unique identifiers.
-
Universally Unique Identifier - Wikipedia
General reference on universally unique identifiers and their variants.