ToolJutsu
All tools
Developer Tools

ULID Generator

Generate sortable, time-based ULIDs.

A ULID is 26 characters: the first 10 encode a millisecond timestamp and the last 16 are random. Sorting ULIDs as text sorts them by creation time.

Processed on your device. We never see your files.

How to use ULID Generator

What this tool does

This tool generates ULIDs — Universally Unique Lexicographically Sortable Identifiers. A ULID is 26 characters long and made of two parts: the first 10 characters encode a 48-bit millisecond timestamp, and the last 16 encode 80 bits of randomness. Both parts use Crockford’s base-32 alphabet, which leaves out the easily confused letters I, L, O, and U. The result is an identifier that is unique, compact, URL-safe, and — crucially — sortable: arranging a list of ULIDs alphabetically also arranges them by the moment they were created.

Why you might need it

Database primary keys are a classic use case. A purely random UUID scatters new rows across an index, which hurts insert performance; a ULID’s leading timestamp means new rows append in order, keeping the index tidy. Because the creation time is embedded, you can also sort records by ID alone without a separate created_at column, and you can read roughly when an ID was made. ULIDs are handy for log correlation, event sourcing, file names that should sort chronologically, and any system where you want the convenience of a UUID plus a natural ordering.

How to use it

  1. Choose how many ULIDs you want — 1, 5, 10, 25, or 100.
  2. Leave Monotonic on if you are generating several at once and want them to stay strictly in order.
  3. Click Generate.
  4. Each row shows the ULID and the human-readable UTC time decoded from it.
  5. Use the copy icon on a row to copy one ULID, or Copy all to copy the whole list.

Common pitfalls

The timestamp comes from your own device’s clock. If that clock is wrong, the embedded time — and therefore the sort order relative to other systems — will be wrong too. This matters when ULIDs from several machines are merged.

Another subtle point is the monotonic guarantee. Without monotonic mode, two ULIDs created in the same millisecond have the same timestamp prefix and random suffixes, so their relative order is essentially random. With monotonic mode on, the random suffix is incremented for each one, so they sort correctly. The monotonic ordering here applies within a single click; it does not coordinate across separate page sessions or other devices.

Finally, remember that ULIDs are case-insensitive by specification but are conventionally written in uppercase. Treat 01arz3... and 01ARZ3... as the same identifier.

Tips and advanced use

If you need many sortable IDs in a tight loop, monotonic mode is what keeps them ordered — generate a batch of 100 with it enabled to see consecutive IDs differ only in their final characters. To recover the creation time of any ULID, decode its first 10 characters from base-32; this tool shows that decoded time next to each generated ID so you can see the relationship directly.

Because generation is entirely local, you can produce identifiers for a private project, a migration script, or seed data without anything touching the network. The randomness is drawn from the browser’s cryptographic generator, the same source used for secure keys, so the 80 random bits are suitable for production identifiers.

Frequently asked questions

Are the ULIDs generated on a server?
No. Every ULID is created in your browser. The timestamp comes from your device's clock and the random part comes from the browser's cryptographic random generator. Nothing is requested from or sent to a server.
What is a ULID and how is it different from a UUID?
A ULID is a 26-character identifier that begins with a millisecond timestamp, so sorting ULIDs as text also sorts them by creation time. A UUID v4 is fully random and has no inherent order. ULIDs are also shorter on screen, use a case-insensitive alphabet, and have no hyphens.
What does the monotonic option do?
When several ULIDs are generated within the same millisecond, the timestamp portion is identical. Monotonic mode increments the random portion for each one instead of randomising it, so the IDs stay strictly in ascending order and remain correctly sortable.
Are ULIDs guaranteed to be unique?
They are not formally guaranteed, but a collision is extremely unlikely. Each ULID includes 80 bits of randomness, so two IDs created in the same millisecond would need to draw the same 80-bit value — a vanishingly small chance for normal workloads.
Can the random part be reversed to reveal anything?
No. Only the first 10 characters encode the timestamp, which this tool shows openly. The last 16 characters are random and carry no information about your device, location, or session.

Related tools