ULID generator
Generate random Universally Unique Lexicographically Sortable Identifier (ULID).
About ULID generator
Generates ULIDs (Universally Unique Lexicographically Sortable Identifiers): 26-character identifiers that start with a timestamp, so they sort by creation time, followed by 80 bits of randomness. Output as plain lines or as a JSON array.
When you would use it
- Primary keys or object ids that must be unique and sort chronologically, such as events, orders or log entries.
- Replacing UUID v4 where index locality and readable, URL-safe ids matter.
- Generating test fixtures with realistic, ordered identifiers.
How to use it
- Set how many ULIDs you need (1 to 100).
- Choose raw lines or a JSON array.
- Copy the result, or refresh (Ctrl+Enter) for a new batch.
Things worth knowing
- The first 10 characters encode the millisecond timestamp, the last 16 are random. ULIDs created in the same millisecond are made monotonic (the random part is incremented) so they still sort in creation order.
- ULIDs use Crockford's Base32 alphabet, which omits I, L, O and U to avoid confusion; they are case-insensitive and safe in URLs.
- Because the timestamp is visible, a ULID reveals roughly when the record was created. If that is sensitive, use UUID v4 instead.
- A ULID is 128 bits, the same size as a UUID, and can be stored in a UUID column by converting its bits; many databases and libraries support this.
Frequently asked questions
- ULID or UUID v7?
- Both are time-ordered 128-bit ids. UUID v7 is the newer standard with native support in more databases and libraries; ULID has a shorter, friendlier text form. Pick whichever your stack supports best.
- Why do consecutive ULIDs differ only in the last characters?
- They were generated in the same millisecond, so the timestamp part is identical and the random part is incremented to keep them sortable. This is by design.