1. Home
  2. Developer tools
  3. ULID Generator

ULID Generator

A ULID is a 26-character identifier that starts with a timestamp, so a list of them sorts in creation order. Generate up to a thousand at a time or paste one to read when it was made.

Free, no sign-up. Runs in your browser: nothing is uploaded.

How to use ULID Generator

  1. Choose how many to generate and any options.
  2. Click Generate and copy the list.
  3. Paste a ULID in the decode box to read its time.

Features

  • Bulk generation up to 1000
  • Monotonic mode so ULIDs in one millisecond still sort
  • Custom timestamp support
  • Upper or lower case output
  • Decoder shows UTC time, milliseconds and randomness
  • Random bits from the browser’s secure generator

Supported formats

Input

  • ULID
  • Count

You get

  • ULID list
  • Date

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the ULID Generator is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Monotonic order is kept only within this page; separate generators do not share their state.
  • The first character of a ULID is at most 7, so the format ends in the year 10889.

Guide

ULIDs: unique identifiers that sort by time

A ULID, short for Universally Unique Lexicographically Sortable Identifier, is a 128-bit identifier written as 26 characters. It has the uniqueness of a UUID but starts with a timestamp, so when you sort a list of ULIDs as text you get them in the order they were created. This page generates them, in bulk if needed, and takes them apart.

The layout

The first ten characters encode a 48-bit count of milliseconds since the Unix epoch. The last sixteen characters encode 80 random bits. Both parts are written in Crockford Base32, an alphabet of the digits 0 to 9 and the letters A to Z without I, L, O and U, so that characters cannot be mistaken for 1 or 0 and no accidental words appear. Because the time comes first and the alphabet is in ascending order, comparing two ULIDs as strings gives the same result as comparing their timestamps.

Generating

Choose how many you want, from 1 to 1000, and press Generate. The random bits come from the secure random generator of your browser. You may leave the timestamp empty to use the current time or enter an ISO date to build ULIDs for another moment, which is useful for tests and data migrations. Output can be upper case, the canonical form, or lower case, and the list can be copied or downloaded.

Monotonic mode

Two ULIDs made in the same millisecond would normally have unrelated random parts and could sort in either order. In monotonic mode the page keeps the previous random value and adds one to it when the time has not changed, so a batch generated within one millisecond stays strictly increasing. This follows the specification’s recommendation. The state lives in the page, so separate generators do not coordinate with each other.

Decoding

Paste a ULID into the decoder to read its parts. The page checks that it has 26 characters from the alphabet and that the first character is at most 7, since a larger value would overflow the 48 bits of the time. It then shows the creation time in UTC, the Unix milliseconds, the ten time characters and the sixteen random characters. Lower-case ULIDs are accepted.

A worked example

The decoder’s Sample button loads 01ARZ3NDEKTSV4RRFFQ69G5FAV, the example in the ULID specification. The time part 01ARZ3NDEK is 1,469,922,850,259 milliseconds, which is 2016-07-30 23:54:10.259 UTC. The randomness is TSV4RRFFQ69G5FAV. In monotonic mode, two ULIDs made for that same millisecond come out as 01ARZ3NDEKF60HENN3ETKKFQBS and 01ARZ3NDEKF60HENN3ETKKFQBT: the same time part, with the final character raised by one.

Limits

The time field holds 48 bits, so the format works until the year 10889. Uniqueness depends on the 80 random bits, which makes a clash extremely unlikely but not impossible, and on the quality of the random source. ULIDs are not secrets: the time part is public, and sequential values are easy to guess, so they should not serve as access tokens. Only the Crockford form is produced; there is no binary or UUID-compatible output.

Checked against the current version of the ULID Generator on .

Frequently asked questions

Why would I choose a ULID over a random UUID as a database key?

ULIDs start with the time, so new rows are inserted near the end of an index instead of at random positions. That keeps inserts fast and the index compact in many databases, and a plain sort by id gives creation order. A random UUID version 4 has no such order.

Does the time part reveal when something was created?

Yes, to the millisecond, to anyone who has the id. If creation times are private, do not expose ULIDs publicly or use a random identifier for that purpose instead.

How is a ULID different from a UUID?

A UUID version 4 is fully random. A ULID has 48 bits of time first, so it sorts by creation time and keeps database indexes tidier, plus 80 random bits, in a shorter text form.

Why does the alphabet skip some letters?

Crockford Base32 leaves out I, L, O and U to avoid confusion with 1 and 0 and to avoid accidental words.

Keep working with the result

openWorkstand also includes a free workspace with documents, spreadsheets, tasks, projects and a calendar that save to a folder on your computer.