T
Tooltastic
Try now

ULID Generator

Universally Unique Lexicographically Sortable Identifiers — like UUIDs, but time-ordered and more database-friendly.

Time-Sortable Bulk Generation 100% Local
Quantity
Timestamp (48 bit) Random (80 bit)
Generated ULIDs ()

Click Generate to create ULIDs

ULID Decoder Paste a ULID to decode its timestamp and random portion
Invalid ULID — must be 26 Crockford Base32 characters
Valid ULID
Time Chars (1–10)
Random Chars (11–26)
UTC
Unix ms

What is a ULID?

A ULID (Universally Unique Lexicographically Sortable Identifier) is a 128-bit identifier encoded as 26 Crockford Base32 characters. The first 10 characters encode a 48-bit millisecond timestamp, and the last 16 encode 80 random bits. This makes ULIDs naturally sortable by creation time.

ULID vs UUID

Unlike UUID v4, ULIDs are lexicographically sortable — newer IDs always sort after older ones. This improves B-tree index performance in databases and makes IDs human-interpretable. ULIDs also use a more compact Base32 encoding without hyphens.

Monotonic Mode

In monotonic mode, ULIDs generated in the same millisecond are guaranteed to be in ascending order — the random portion is incremented by 1. This is critical for distributed systems where multiple IDs must maintain strict ordering within a single timestamp.

Frequently Asked Questions

Everything you need to know about ULIDs

A ULID is a 128-bit identifier encoded as a 26-character Crockford Base32 string (e.g. 01ARZ3NDEKTSV4RRFFQ69G5FAV). The first 10 characters represent a 48-bit timestamp in milliseconds since Unix epoch (good until the year 10889). The remaining 16 characters are 80 bits of cryptographically random data. This gives over 1.208 × 10^24 possible values per millisecond.

Both are 128-bit unique identifiers, but with key differences. ULIDs are lexicographically sortable by generation time, which improves database index performance significantly. They use Crockford Base32 (no hyphens, case-insensitive), making them 26 characters vs UUID's 36. UUIDs have a slightly higher entropy per character but are not sortable by default. For most database use cases, ULIDs are the better choice.

In normal mode, ULIDs in the same millisecond may not sort correctly because they have independent random portions. Monotonic mode solves this: the random portion is incremented by 1 for each ULID generated within the same millisecond, guaranteeing strict ascending order within a batch. Use monotonic mode whenever you need absolute sort guarantees for high-throughput ID generation.

Yes. The first 10 characters of a ULID encode a 48-bit Unix timestamp in milliseconds. To decode it, interpret each character using Crockford Base32 (alphabet: 0123456789ABCDEFGHJKMNPQRSTVWXYZ) and multiply out positionally in base 32. The ULID Decoder section of this tool does this automatically and shows you the exact creation timestamp in UTC and local time.

Yes, ULIDs are an excellent choice for primary keys. Their lexicographic sortability means sequential inserts maintain B-tree locality, unlike random UUID v4 which causes page fragmentation and performance issues. Many production systems use ULIDs as primary keys in PostgreSQL, MySQL, and other databases. The 80-bit random portion makes collisions practically impossible even at very high generation rates.

Generate ULIDs – sortable unique identifiers

A ULID generator creates Universally Unique Lexicographically Sortable Identifiers: unique values that, unlike a purely random UUID, embed a timestamp and can therefore be sorted in chronological order. A ULID combines 48 bits of time with 80 bits of randomness, is 26 characters long and URL-safe. This tool produces them directly in the browser and is aimed at developers who need sortable keys without a separate timestamp index.

Common use cases

  • Sortable records: Use ULIDs as primary keys whose order already reflects creation time, which is handy for logs and events.
  • Distributed IDs without coordination: Generate low-collision, time-ordered identifiers across several services without maintaining a central sequence.
  • Readable references: Use the compact Crockford Base32 form in URLs or file names without any special characters.
  • Time-aware file names: Name uploads or exports so that they sort chronologically on their own.

How to create a ULID

  1. 1 Generate a new ULID based on the current time with one click.
  2. 2 Enable monotonic mode when you need strictly increasing values within the same millisecond.
  3. 3 Use the decoder to reveal the timestamp and random part of an existing ULID.
  4. 4 Copy individual values or generate a whole list at once.

Why ULIDs instead of UUIDs?

ULIDs combine the uniqueness of a UUID with the natural sortability of a timestamp. As a result, records can be ordered chronologically by their key alone, which eases the load on database indexes. This tool also shows the anatomy of each ID and supports monotonic mode and bulk generation. If you do not need chronological order and prefer maximum randomness, the UUID generator is the right alternative. Because the time part is openly visible, avoid ULIDs where the creation time must stay secret.

Free tools that pair well with this one – right in your browser, no sign-up.