ULID Generator

ULID Generator

Generate compact, sortable, URL-safe unique identifiers

Standard UUIDs
Modern Alternatives

No UUIDs Generated Yet

Click "Generate" to create UUIDs

UUID v4

Random UUIDs. Most commonly used for general purposes.

UUID v7

Time-ordered and random. Best for databases and sorting.

ULID

Sortable 26-char IDs. Perfect for distributed systems.

NanoID

Compact 21-char URL-safe IDs. Great for frontend use.

Example ULID Output:01ARZ3NDEKTSV4RRFFQ69G5FAV

What is ULID?

ULID (Universally Unique Lexicographically Sortable Identifier) addresses UUID's main weaknesses: poor sortability and inefficient string representation. At 26 characters using Crockford's Base32, ULIDs are shorter than UUIDs while maintaining 128-bit uniqueness.

The first 10 characters encode a 48-bit Unix timestamp in milliseconds, while the remaining 16 characters encode 80 bits of randomness. This gives you time-ordering by default with collision resistance comparable to UUID v4.

Why Use ULID?

ULIDs are more practical than UUIDs in many scenarios. They're URL-safe without encoding, case-insensitive, and sort correctly as strings. Database indexes on ULID columns perform better because of natural time-ordering.

The compact representation (26 vs 36 characters) saves storage and bandwidth. In URLs, API responses, and logs, this 28% reduction adds up across millions of identifiers.

How ULID Works

ULID generation:

1. Get Unix timestamp in milliseconds (48 bits) 2. Generate 80 bits of randomness 3. Encode timestamp as 10 Crockford Base32 characters 4. Encode randomness as 16 Crockford Base32 characters 5. Concatenate: TTTTTTTTTTРRRRRRRRRRRRRRRR

Crockford's Base32 excludes I, L, O, U to avoid confusion and profanity.

Common Use Cases

  • URL-friendly resource identifiers
  • Log correlation across services
  • Database primary keys needing sortability
  • APIs prioritizing compact responses

Pro Tip

ULID's monotonic option ensures IDs generated in the same millisecond are still ordered correctly.

Other ID Generators