Home/IDs & Random/ULID Generator

ULID Generator

Generate ULIDs — 26 characters, sortable by creation time, safe in URLs, and readable without the dashes and ambiguity of a UUID.

Free Browser-based No signup Copy-ready
Generator Settings
ULIDs encode the millisecond they were created, so generating for a past date lets you build realistic historical fixtures.
The spec is uppercase. Crockford Base32 decoding is case-insensitive, so lowercase still parses.
Options
Generated ULIDs
ulids.txt

      

How it works

1

Set count and timestamp

Generate for now, a fixed moment, or spread across a date range for historical fixtures.

2

Keep monotonic on

IDs created in the same millisecond still sort in creation order.

3

Export or decode

Copy as a list, JSON, CSV or SQL — or paste an existing ULID to read its timestamp.

ULID vs UUID v7 — how to choose

Both solve the same problem: globally unique identifiers that sort by creation time. They differ mainly in encoding and ecosystem, and the right answer usually comes down to where the ID will be seen.

ULID wins on ergonomics

  • 26 characters instead of 36 — noticeably shorter in URLs and logs.
  • No dashes, so double-click selects the whole ID.
  • Crockford Base32 excludes I, L, O and U, so nobody misreads a 1 for an l when copying from a screen or reading over the phone.
  • Case-insensitive when decoding.

UUID v7 wins on ecosystem

  • It is a real IETF standard (RFC 9562); ULID is a community spec.
  • Native database column types exist — PostgreSQL uuid, 16 bytes on disk with real index support.
  • Every language and ORM already understands the format.
  • Stored as text, a ULID needs CHAR(26) unless you convert to binary yourself.

A reasonable default: UUID v7 for internal database keys where native types and tooling matter, ULID for identifiers that humans see, type or read aloud — order numbers, support tickets, short share links.

Like UUID v7, a ULID publishes its creation time. If the moment a record was created is sensitive — or if an attacker could infer volume from watching IDs — use a fully random identifier such as a NanoID instead.

Frequently Asked Questions

View all FAQs
How long is a ULID?
A canonical ULID is 26 characters and represents a 128-bit value.
Is ULID a UUID?
No. It is a separate community specification, although both ULID and UUID are 128-bit identifier formats.
Does ULID contain a timestamp?
Yes. The first 48 bits encode a Unix timestamp in milliseconds.
Are ULIDs sortable?
Yes. Properly generated ULIDs are lexicographically sortable by their timestamp. Monotonic generation preserves ordering for multiple IDs in the same millisecond.
Is ULID URL-safe?
Yes. Its Crockford Base32 text form uses letters and digits without URL-reserved punctuation.
ULID or UUID v7: which should I choose?
Choose ULID for compact sortable text. Choose UUID v7 when native UUID types and RFC-standardized UUID interoperability are more important.
Is this ULID generator free?
Yes. Generate, format, decode and download ULIDs above without creating an account.

ULID Generator – Create Sortable, URL-Safe Identifiers Online

Use the ULID Generator above to create Universally Unique Lexicographically Sortable Identifiers in your browser. Generate one or thousands, choose the timestamp, switch between canonical uppercase and lowercase output, enable monotonic ordering and decode an existing ULID to see when it was created.

A ULID is a 128-bit identifier represented as 26 Crockford Base32 characters.

Its first 48 bits encode a millisecond timestamp. The remaining 80 bits provide randomness.

That layout makes ULIDs compact, URL-friendly and naturally sortable by time—a useful combination for database records, APIs, logs, events and distributed applications.

What Is a ULID?

ULID stands for Universally Unique Lexicographically Sortable Identifier.

A typical ULID looks like:

01ARZ3NDEKTSV4RRFFQ69G5FAV

The format contains two logical parts:

PartSizePurpose
Timestamp48 bitsUnix time in milliseconds
Randomness80 bitsUniqueness within the timestamp
Total128 bitsComplete ULID

The 128-bit value is encoded using Crockford Base32, producing a fixed 26-character string.

Because the timestamp comes first, normal lexicographic string sorting also sorts correctly generated ULIDs by time.

How to Use This ULID Generator

Choose how many identifiers you want.

For normal use, leave the timestamp set to the current time.

For test fixtures, you can choose a specific date and time. This is useful when you need realistic records that sort as if they were created in the past.

Next, choose uppercase or lowercase output.

The canonical ULID representation is uppercase. Crockford Base32 decoding is case-insensitive, so many implementations also accept lowercase.

Enable Monotonic within a millisecond when generating multiple values that may share exactly the same millisecond timestamp.

Then copy, download or export the generated values.

You can paste an existing ULID into the decoder to inspect its timestamp and validate the string.

Why Are ULIDs Sortable?

The timestamp is encoded at the beginning of the identifier.

That means an older ULID normally starts with a lower encoded time value than a newer one.

Example conceptually:

Older record: 01H...

Newer record: 01J...

Because the time component comes first, text sorting can follow creation chronology.

This is different from UUID v4, where the value is random and sorting the ID does not meaningfully represent creation time.

Sortable IDs are convenient in databases, logs and event systems where recent records are often grouped together.

What Is Crockford Base32?

Crockford Base32 is an encoding alphabet designed to be compact and easier for humans to read than many other binary-to-text formats.

ULID uses characters that avoid several ambiguous letters.

The canonical encoding does not use letters such as I, L, O and U.

That reduces visual confusion in copied identifiers.

Base32 also allows a 128-bit value to fit into 26 characters, compared with the 36-character standard textual form of a UUID.

ULIDs contain no punctuation, which makes them convenient in URLs, filenames and systems where hyphens are undesirable.

ULID Timestamp Explained

The timestamp portion is 48 bits and represents Unix time in milliseconds.

That gives ULID millisecond-level time ordering, and a decoder can recover the approximate creation time.

Do not choose ULID if creation time itself must remain hidden.

Also avoid treating the embedded timestamp as your only business timestamp. Keep a normal created_at field when your application needs explicit date queries, auditing or time-zone-aware logic.

What Does Monotonic ULID Mean?

Several ULIDs can be created during one millisecond.

If every value uses a new random 80-bit portion, those same-millisecond ULIDs are unique but may not appear in the exact order they were generated.

A monotonic ULID generator solves that by incrementing the random component when the timestamp has not advanced.

This preserves lexicographic order for identifiers created in the same millisecond.

Monotonic generation is especially useful in high-throughput applications where many records can be created during one clock tick.

Production code should use a library that correctly handles monotonic state and overflow.

How Unique Is a ULID?

The random component contains 80 bits.

Within a given millisecond, that provides an enormous identifier space.

The ULID specification describes roughly 1.21 × 10²⁴ possible random values per millisecond.

Collisions are therefore extremely unlikely with a secure implementation.

Still, identifier uniqueness should not be treated as a replacement for database integrity.

If a column must be unique, enforce that with a UNIQUE constraint or primary key.

The generator makes structurally valid IDs; your application remains responsible for persistence rules.

ULID vs UUID v7

ULID and UUID v7 are close alternatives.

Both are 128-bit, timestamp-first identifiers designed to sort roughly by creation time.

The biggest difference is representation and standardization.

FeatureULIDUUID v7
Size128 bits128 bits
Text length26 characters36 characters
EncodingCrockford Base32UUID hexadecimal format
Millisecond timestampYesYes
Lexicographically sortableYesYes
URL-friendly textExcellentGood
IETF UUID standardNoYes
Native UUID DB typeNot directlyYes

Use ULID when compact sortable text is attractive.

Use UUID v7 when standards-based UUID interoperability and native database UUID support matter more.

Try the UUID v7 Generator if you want to compare both formats side by side.

ULID vs NanoID

NanoID is usually a random identifier without a timestamp.

ULID includes time by design.

That leads to different strengths.

Choose ULID when:

  • You want chronological sorting
  • You want a fixed 26-character format
  • Exposing approximate creation time is acceptable

Choose NanoID when:

  • You want a shorter configurable ID
  • You want a custom alphabet
  • You do not need time ordering
  • You prefer no embedded timestamp

NanoID’s default length is 21 characters, while a ULID is always represented canonically as 26 Base32 characters. See the NanoID Generator.

ULID vs MongoDB ObjectId

Both formats embed time.

MongoDB ObjectId uses a 4-byte timestamp with one-second resolution and additional bytes for process uniqueness and a counter.

ULID uses a 48-bit millisecond timestamp plus 80 bits of randomness.

ObjectId is deeply integrated into MongoDB.

ULID is database-agnostic and useful when IDs need to travel between different systems while remaining sortable as text.

If you are generating MongoDB _id values, the MongoDB ObjectId Generator is the more relevant tool for fixtures and decoding.

Are ULIDs URL-Safe?

Yes. Crockford Base32 uses letters and digits without URL-reserved punctuation, so ULIDs work cleanly in routes, JSON, CSV, filenames and API paths.

URL-safe does not mean secret. The timestamp is decodable, and authorization should never depend on an identifier simply being hard to guess.

Uppercase vs Lowercase ULID

The canonical ULID representation is uppercase, although Crockford Base32 decoding is case-insensitive.

Use uppercase for the safest interoperability. If your application deliberately uses lowercase, make sure every system accepts it and keep the stored format consistent.

Can You Create ULIDs for Past Dates?

Yes. A chosen timestamp is useful for database seeds, historical fixtures, migration simulations and sorting tests.

For production data, generate the identifier at the appropriate event time unless your migration design specifically requires preserving an original timestamp.

ULID Overflow and Validation

A 26-character Base32 string can theoretically represent 130 bits, but a ULID contains only 128 bits.

That means not every possible 26-character Base32 string is a valid ULID.

The canonical specification defines a maximum encoded value. Decoders should reject values above the 128-bit range rather than silently overflowing.

A proper validator should also check:

  • Length is 26 characters
  • Characters belong to the accepted alphabet
  • Encoded value fits the ULID range
  • Timestamp can be decoded correctly

Do not validate a ULID using length alone.

Secure Randomness Matters

The 80-bit random component should come from a cryptographically strong random source.

This browser tool uses secure random-number facilities rather than relying on Math.random().

That gives the generated output appropriate randomness for identifier generation.

For production applications, use a trusted ULID library for your runtime or language, especially when monotonic behavior is required across concurrent requests.

The online tool is ideal for fixtures, testing, debugging and one-off batches.

Common ULID Mistakes

Avoid these problems:

  • Assuming ULID is an IETF UUID standard
  • Treating the embedded timestamp as private
  • Depending on ID order as your only event-order guarantee
  • Mixing uppercase and lowercase without a policy
  • Generating randomness with a weak PRNG
  • Validating only the 26-character length
  • Forgetting a database uniqueness constraint
  • Reimplementing monotonic logic without handling edge cases

The format is simple to read, but robust generation still deserves a tested implementation.

Related searches

ulid generatorsortable unique idcrockford base32ulid vs uuid v7ulid monotoniclexicographically sortable idulid decode timestampulid database storageulid vs nanoidtime ordered identifierulid validationulid vs mongodb objectid