DevsToolkit

ULID Generator

Identifiers

Generate lexicographically sortable, time-ordered ULIDs (Universally Unique Lexicographically Sortable Identifiers) in your browser

All processing happens locally in your browser — your data never leaves your machine.
Loading tool...

Examples

Single ULID

Input
Generate 1 ULID
Output
01HQK2V5C8N7R3X4ZQEMV8YBPD

Bulk Generation

Input
Generate 5 ULIDs (sorted by creation time)
Output
01HQK2V5C8N7R3X4ZQEMV8YBPD
01HQK2V5CC2KH9M0E2RVZGM6JX
01HQK2V5CCGS5KFR1VFJC44Q1Y
01HQK2V5CDV8Z2YJ8YPSWZN1RM
01HQK2V5CET8...

As Database Primary Key

Input
INSERT INTO events (id, name) VALUES (?, 'page_view')
Output
id          = 01HQK2V5C8N7R3X4ZQEMV8YBPD
created_at  = 2024-03-05T11:42:17.448Z (encoded in id prefix)

Frequently Asked Questions

What is a ULID?
A ULID (Universally Unique Lexicographically Sortable Identifier) is a 128-bit identifier encoded as 26 Crockford Base32 characters. The first 48 bits encode a millisecond timestamp, and the remaining 80 bits are random. Because the timestamp comes first, ULIDs sort chronologically by their string value — useful for database primary keys, log entries, and event streams.
ULID vs UUID — which should I use?
Use a UUID v4 when you only need a random unique identifier and ordering doesn't matter. Use a ULID (or UUID v7) when you want IDs that sort by creation time, which helps index locality in databases like PostgreSQL and improves performance for time-range queries. ULIDs are also URL-safe and shorter (26 chars vs 36 for UUID with hyphens).
Are ULIDs unique?
Yes. Each ULID contains 80 bits of cryptographically secure randomness from the Web Crypto API. The probability of collision within the same millisecond is around 1 in 2^80 — for practical purposes, indistinguishable from impossible.
Why Crockford Base32?
Crockford Base32 omits the characters I, L, O, and U to avoid visual ambiguity (e.g., confusing 0 with O, or 1 with I or L). This makes ULIDs safer to type, transcribe, and read aloud. The encoding is also case-insensitive and URL-safe by default.
Is generation safe and private?
Yes. ULIDs are generated entirely in your browser using crypto.getRandomValues from the Web Crypto API. No identifiers are transmitted to any server, logged, or cached.

Related Tools