🔧

ULID Generator

Generate Universally Unique Lexicographically Sortable Identifiers.

01M0V2KC9PZEC3XJD770P10XPM
01M0V2KC9PA11K2RSRW8FK85ZZ
01M0V2KC9PKQ89JWG1768C6HFX
01M0V2KC9PMK1PH4YASHSC210X
01M0V2KC9P6JZN511H5QT6FRK7

How to Use

  1. Set the number of ULIDs to generate. Optionally specify a custom timestamp (defaults to the current time in milliseconds).
  2. Each generated ULID consists of a 10-character timestamp prefix and a 16-character random suffix, encoded in Crockford Base32 (26 characters total, uppercase letters and digits, no ambiguous characters).
  3. Copy the ULIDs for use as database primary keys, event IDs, log entry identifiers, or any situation requiring time-sortable unique identifiers.

Frequently Asked Questions

What is the difference between ULID and UUID?
ULIDs are lexicographically sortable — sorting them alphabetically is the same as sorting by creation time. They are also more compact: 26 characters vs 36 for UUID (no hyphens). UUID v4 is purely random with no time ordering. ULID is ideal when you need both uniqueness and natural time-based ordering.
How precise is the timestamp portion?
The timestamp encodes millisecond precision. For ULIDs generated within the same millisecond, the random portion is monotonically incremented to guarantee strict ordering even at high generation rates.
Can ULIDs be used as database primary keys?
Yes — ULIDs are an excellent choice for primary keys. Their time-ordered nature improves B-tree index performance by reducing page splits compared to random UUIDs. They work as text or binary columns in any major database.