ZeroTool Workbench
ULID Generator
Generate ULIDs (Universally Unique Lexicographically Sortable Identifiers) online. Single or batch up to 100. Shows timestamp and random components. Built-in ULID decoder. 100% client-side, no dependencies.
How to Use
- Set the Batch Count (1–100) for how many ULIDs to generate at once.
- Click Generate to create new ULIDs.
- Each row shows the full ULID, its decoded timestamp (UTC), and the random component.
- Click Copy on any row to copy that ULID, or click Copy All to copy all generated ULIDs as a newline-separated list.
- Use the ULID Decoder at the bottom to paste an existing ULID and extract its timestamp.
ULID Structure
01ARZ3NDEKTSV4RRFFQ69G5FAV
├─ Timestamp (10 chars) ──┤├── Randomness (16 chars) ──┤
48-bit ms since epoch 80-bit cryptographic random
ULID vs UUID Comparison
| Feature | ULID | UUID v4 |
|---|---|---|
| Length | 26 chars | 36 chars (with dashes) |
| Sortable | ✓ Yes | ✗ No |
| Timestamp-embedded | ✓ Yes | ✗ No |
| URL-safe | ✓ Yes | ✓ Yes |
| Case-insensitive | ✓ Yes | ✓ Yes |
| Randomness bits | 80 | 122 |
Why Sort Order Matters in Databases
When using random UUIDs as primary keys in B-tree indexes (PostgreSQL, MySQL), insertions become non-sequential, leading to index fragmentation and slower range queries. Using ULIDs as primary keys keeps inserts nearly sequential, improving INSERT and SELECT performance significantly on large tables.
Related Tools
- UUID Generator — generate standard UUID v4 identifiers
FAQ
What is a ULID?
ULID (Universally Unique Lexicographically Sortable Identifier) is a 128-bit identifier represented as 26 characters in Crockford Base32. Unlike UUID v4, ULIDs are monotonically sortable — they encode a 48-bit millisecond timestamp followed by 80 bits of randomness. This means ULIDs sort chronologically by default.
How is a ULID structured?
A ULID is 26 characters long: the first 10 characters encode the timestamp (48 bits, millisecond precision, valid until year 10889), and the remaining 16 characters are cryptographically random (80 bits). The encoding uses Crockford Base32: 0-9 and A-Z excluding I, L, O, U to avoid visual ambiguity.
How does ULID compare to UUID?
UUID v4 is entirely random and does not sort chronologically. ULIDs sort lexicographically in creation order, which makes them much better for database primary keys — inserting in order reduces B-tree fragmentation and improves query performance on range scans. ULIDs are also URL-safe and case-insensitive.
What is the ULID decoder for?
Paste an existing ULID to extract its creation timestamp. This is useful for debugging — you can determine exactly when a record was created directly from its ID without a separate created_at column.
Is this tool client-side only?
Yes. ULID generation uses the browser's Web Crypto API (crypto.getRandomValues) for randomness and Date.now() for timestamps. Nothing is sent to a server.