ULID Generator

Generate ULIDs - sortable by time, encoded in Crockford Base32.

Last reviewed: April 2026

New to this tool? Click here for instructions

Generated ULID
Breakdown
Click Generate ULID to create a new identifier.

Quick Answer

A ULID (Universally Unique Lexicographically Sortable Identifier) is a 26-character ID that, unlike a UUID, sorts chronologically because its leading bits encode a timestamp. Generate one or many ULIDs above. They make useful database keys when you want both uniqueness and natural time ordering. Generation happens entirely in your browser.

How to Use the ULID Generator

To use the ULID Generator, follow these steps:

1. Click the 'Generate ULID' button to create a new ULID.

2. Enable 'Monotonic mode' if you need guaranteed ordering within the same millisecond.

3. In 'Bulk mode,' set a count from 1 to 100 to generate multiple ULIDs at once.

4. Use 'Decode mode' to paste any ULID and extract its embedded timestamp and random portion.

5. Compare two ULIDs in 'Compare mode' to determine their creation order and time difference.

When to Use the ULID Generator

Use the ULID Generator when you need sortable identifiers, such as primary keys in databases or event-sourcing systems. ULIDs are particularly useful when you require time-ordered retrieval and want to avoid index fragmentation.

How It Works

The ULID Generator uses a combination of a millisecond-precision Unix timestamp and cryptographically secure random data to create unique identifiers. The timestamp is encoded in the first 48 bits, ensuring that ULIDs generated later will sort after earlier ones. The remaining 80 bits are randomly generated using `crypto.getRandomValues()`, providing approximately 1.2 - 10^-4 unique values per millisecond. Monotonic mode is an optional feature that increments the random component by one when generating multiple ULIDs within the same millisecond, ensuring strict lexicographic ordering.

Tips, Edge Cases, or Limitations

Always ensure that the 'crypto.getRandomValues()' function is available in your environment to generate cryptographically secure random data.

Be aware that ULIDs are case-insensitive and URL-safe, making them suitable for use in web applications and URLs.

While ULIDs are designed to be sortable by time, the random component can still introduce some level of randomness, which may be a concern in certain applications.

Frequently Asked Questions

A ULID (Universally Unique Lexicographically Sortable Identifier) is a 128-bit identifier that combines a millisecond-precision Unix timestamp with cryptographically secure random data. This ensures that ULIDs are unique and sortable by time.
A ULID is encoded as a 26-character string using Crockford's Base32 alphabet. The first 10 characters represent the timestamp in milliseconds, and the remaining 16 characters are randomly generated.
Monotonic mode increments the random component by one when generating multiple ULIDs within the same millisecond, ensuring strict lexicographic ordering.
Use ULID when you need sortable identifiers, such as primary keys in databases or event-sourcing systems. ULIDs are particularly useful when you require time-ordered retrieval and want to avoid index fragmentation.
Yes, the timestamp component of a ULID is generated using a secure random number generator, ensuring that it is cryptographically secure.

Quick reference

ULID Generator β€” quick reference
AspectDetail
PurposeULID Generator is a free browser tool for fast, repeatable tasks.
Runs inAny modern browser β€” no install, no signup.
PrivacyData is processed locally in your browser; no upload to any server.
Best forQuick lookups, daily reference, learning, prototyping.