ToolHub

ULID Generator

Generate sortable unique IDs

ULID Generator
01KVV1JAES76XT2GW3THGQE8AF

Embedded timestamp: Jun 23, 2026, 08:08:24 PM (1782245304793 ms)

A ULID packs a 48-bit millisecond timestamp followed by 80 bits of randomness into a 26-character Crockford Base32 string. Because the time prefix comes first, ULIDs sort lexicographically by creation time. Timestamps and randomness are generated locally with crypto.getRandomValues.

Overview

Generate sortable ULIDs in your browser

A ULID (Universally Unique Lexicographically Sortable Identifier) is a 128-bit identifier designed to be a friendlier alternative to the classic UUID. It packs a 48-bit millisecond timestamp followed by 80 bits of randomness, then encodes the whole thing as a compact 26-character string using Crockford Base32.

ToolHub ULID Generator creates single ULIDs or batches of ten, decodes the embedded timestamp back into a readable date, and lets you copy results with one click. The timestamp comes from Date.now() and the randomness from crypto.getRandomValues, all locally in your browser.

Step-by-step

How to generate a ULID

  1. 1

    Generate one or many

    Click Generate for a single fresh ULID, or Generate 10 to produce a bulk list at once.
  2. 2

    Inspect the timestamp

    For the single ULID, the tool decodes its leading 10 characters and shows the creation time as a readable date.
  3. 3

    Copy what you need

    Use Copy to grab a single ULID, or Copy all to grab the entire bulk list, one per line.

Background

How a ULID is structured

The 26 characters split into two parts. The first 10 characters encode a 48-bit timestamp: the number of milliseconds since the Unix epoch. The remaining 16 characters encode 80 bits of cryptographic randomness. Together that is 128 bits of information, the same size as a UUID, but rendered in a denser, case-insensitive alphabet.

Crockford Base32 encoding

ULIDs use Crockford Base32, whose alphabet is 0123456789ABCDEFGHJKMNPQRSTVWXYZ. It deliberately omits the letters I, L, O, and U to avoid confusion with the digits 1 and 0 and to dodge accidental rude words. This makes ULIDs comfortable to read aloud, type by hand, and double-click to select.

Why lexicographic sorting matters

Because the timestamp sits at the front and Base32 preserves byte order, sorting ULIDs as plain text also sorts them by creation time. That property is valuable for database indexes: new rows append to the end of the index instead of scattering randomly the way UUID v4 keys do, which keeps writes fast and indexes tight.

Use cases

When to use ULIDs

Database primary keys

Use time-ordered IDs so inserts stay sequential and B-tree indexes do not fragment like they do with random UUIDs.

Distributed systems

Generate unique IDs on many machines without coordination, while still keeping a rough global time order.

Event and log streams

Tag events with ULIDs so they sort chronologically by ID alone, even without a separate timestamp column.

URL-friendly identifiers

The Crockford Base32 form is compact and safe in URLs, filenames, and paths without extra escaping.

Sortable object storage keys

Name objects with ULIDs so listing a bucket returns them in creation order naturally.

Replacing UUID v4

Swap random UUIDs for ULIDs when you want the same uniqueness plus built-in time ordering.

Tips and best practices

  • ULIDs are 26 characters versus 36 for a hyphenated UUID, so they are shorter while carrying the same 128 bits.
  • The timestamp has millisecond resolution. Two ULIDs created in the same millisecond order by their random part.
  • Crockford Base32 is case-insensitive on decode, so you can lowercase ULIDs for display without losing information.
  • If you need strict monotonicity within a millisecond, use a generator that increments the random component.
  • ULIDs expose their creation time. If that is sensitive, prefer a fully random identifier instead.

Common questions

How is a ULID different from a UUID?

Both are 128-bit identifiers. A random UUID v4 has no inherent order, while a ULID embeds a timestamp at the front so it sorts by time. ULIDs are also shorter on the page (26 versus 36 characters) and use a friendlier Base32 alphabet instead of hexadecimal with dashes.

Are ULIDs guaranteed to be unique?

With 80 bits of randomness per millisecond, the chance of a collision inside a single millisecond is astronomically small for normal workloads. Across different milliseconds the timestamp already differs, so practical collisions are not a concern.

Can I recover the creation time from a ULID?

Yes. The first 10 characters decode back into the millisecond timestamp. This tool does exactly that and displays the date for the single generated ULID. Keep in mind anyone holding the ULID can read that time too.

Is the randomness cryptographically secure?

The random bits come from crypto.getRandomValues, the browser cryptographically secure random source. ULIDs are meant as identifiers rather than secrets, but the randomness itself is high quality.

100% private

Privacy and security

Every ULID is generated locally using your browser clock and crypto.getRandomValues. Nothing is requested from a server and no identifier ever leaves your device.

Related tools

Frequently asked questions

What is a ULID?

A ULID is a 128-bit identifier with a 48-bit timestamp and 80 bits of randomness, encoded as 26 sortable characters. It is an alternative to UUID.

How is a ULID different from a UUID?

ULIDs sort by creation time and use case-insensitive Base32, while UUIDs are random and not naturally sortable.

Are the IDs generated privately?

Yes. ULIDs are created in your browser using the Web Crypto random generator. Nothing is sent anywhere.