Developer Tools

ULID generator.

Generate ULIDs — 26-character identifiers that combine a millisecond timestamp with 80 bits of randomness, encoded in Crockford's Base32. Unlike UUID v4, they sort lexicographically by creation time. Bulk-create up to 100 at a time.

Advertisement

Options

Formatting

ULIDs

Pick options, then press Generate.

Advertisement

How it's generated

A ULID packs two parts into 128 bits, exactly like a UUID, but encodes them so the string sorts in creation order: a 48-bit timestamp (milliseconds since the Unix epoch, good until the year 10889) followed by 80 bits of cryptographically random data. The whole thing is encoded in Crockford's Base32 alphabet — 32 symbols, excluding the visually ambiguous I, L, O, and U — giving a fixed 26-character, case-insensitive, URL-safe string: 10 characters of timestamp followed by 16 characters of randomness.

Because the timestamp comes first, a ULID generated in a later millisecond always sorts after one generated in an earlier millisecond when compared as plain strings — useful as a database primary key where UUID v4's pure randomness causes index fragmentation. Within the same millisecond the order is set by the random part (see the note on bulk generation below). The random tail still gives 280 (about 1.2 × 1024) possible values per millisecond, so collisions within the same millisecond are astronomically unlikely.

Spec: ulid/spec on GitHub is the canonical reference this generator follows.

How to use the generator

Drag the Count slider (1 to 100), tick Lowercase if your system prefers it, and press Generate. The ULIDs appear one per line with a Copy all button. Each press creates new values from the current time and fresh random bytes.

Worked example: reading a ULID by hand

A ULID has 26 characters. The first 10 are the time, the last 16 are random. Take the instant 1,700,000,000,000 milliseconds after the Unix epoch (2023-11-14 22:13:20 UTC). Written in Crockford Base32 it is 01HF7YAT00. One millisecond later it is 01HF7YAT01. So any ULID generated at that millisecond starts with 01HF7YAT00, followed by 16 random characters. The same prefix appears in every ULID from that moment, which is why a plain text sort puts them in time order.

The ten-character time field is 48 bits, and the largest value is 7ZZZZZZZZZ, which is 248−1 milliseconds, or 10889-08-02 05:31:50.655 UTC. That is the origin of the “good until the year 10889” line in the ULID specification.

Bulk generation: what order do the IDs come in?

This generator builds each ULID from the clock and 10 fresh random bytes. When you ask for 100, they are created within about the same millisecond, so they share the same ten-character prefix and differ only in the random tail. Their order in the list is therefore random, not increasing. The ULID specification describes an optional monotonic mode for IDs created in the same millisecond, where the random part is increased by one for each new ID. This page does not use that mode, so if you need a strictly increasing batch, sort the list yourself (a text sort works) or use a library that implements it.

ULID, UUID v4 and UUID v7

If your database or framework has built-in UUID v7 support, that may be the lower-friction choice. Choose ULID when you want the compact text form, or when an existing system already uses it.

Case and look-alike characters

The alphabet 0123456789ABCDEFGHJKMNPQRSTVWXYZ leaves out I, L, O and U. Crockford’s decoding rules accept lowercase and read i or l as 1 and o as 0, so a mistyped ID is still understood, while encoding uses uppercase. The Lowercase option here is only a display choice, and the two forms are the same ID.

Things a ULID is not

Sources

Each source below was opened and checked in October 2026 (retrieved 2026-10).

Advertisement

Frequently asked questions

How is a ULID different from a UUID v4?

Both are 128-bit identifiers, but a UUID v4 is entirely random, so a set of them sorts in no particular order. A ULID's first 48 bits are a timestamp, so a set of ULIDs sorts lexicographically by the time each one was created — handy for database keys, log IDs, and anything you'll want in chronological order without a separate created_at column.

Does encoding the timestamp leak information?

Yes — anyone who sees a ULID can decode the exact millisecond it was created. That's a deliberate tradeoff for sortability. If creation time must stay private, use a UUID v4 instead.

Are these safe to use as database primary keys?

Yes, that's the main use case ULIDs were designed for. The leading timestamp keeps new rows appended near the end of an index (like an auto-increment integer), while the random tail still gives global uniqueness without a central counter.

Is a ULID generator the same as a UUID generator?

No. Both make 128-bit identifiers, but a ULID is written as 26 Crockford Base32 characters and begins with a timestamp. A UUID is written as 36 characters of hexadecimal with hyphens, and a version 4 UUID has no time order.

Are ULIDs generated in one batch in increasing order?

Not on this page. IDs created in the same millisecond share a time prefix and differ in their random tail, so their order is random. The specification has an optional monotonic mode that increments the random part within a millisecond; this generator does not use it.

How do I get the creation time out of a ULID?

Decode the first 10 characters from Crockford Base32 to a number of milliseconds since 1970-01-01 UTC. For example, 01HF7YAT00 decodes to 1,700,000,000,000 ms, which is 2023-11-14 22:13:20 UTC.

Are ULIDs case sensitive?

No. Crockford Base32 accepts uppercase and lowercase letters when decoding, and encoding uses uppercase. The lowercase option gives the same ID in a different display.

Why are the letters I, L, O and U missing?

I and L look like the digit 1 and O looks like 0, so they are left out to avoid transcription errors; U is left out to avoid accidental obscenity. When decoding, i and l are read as 1 and o as 0.

What is the difference between ULID and UUID v7?

They share the same idea: a 48-bit millisecond timestamp followed by random bits. UUID v7 (RFC 9562) uses the standard UUID text format and fits a native UUID column. A ULID is the shorter 26-character Base32 text.

Can I use a ULID as a secret token?

No. The timestamp part is readable by anyone who sees the ID, and the ID is meant to identify a record, not authorise access. Use a dedicated random token for secrets.

Is anything sent to a server?

No. Each ULID is built in your browser with the system clock and crypto.getRandomValues. Nothing is logged or sent.

Generated entirely in your browser

Every ULID is built locally with crypto.getRandomValues. Nothing is sent to any server, and nothing is logged.