ULID Generator
Generate 26-character ULIDs with a millisecond timestamp prefix and 80 random bits, Crockford base32.
Sortable identifiers
A ULID is 26 Crockford base32 characters: ten encode a 48-bit millisecond timestamp and sixteen encode 80 random bits. Generate up to twenty at once; each row shows the decoded UTC time.
The alphabet omits I, L, O and U. Across milliseconds the lexical order follows the timestamp; within one millisecond the order falls to the random half. The page reads the time back from the prefix rather than from a side table.
A ULID is an identifier, not a secret: the timestamp is readable and the random half is not a password. Nothing is stored or sent.
This page generates ULIDs: 26 characters of Crockford base32, the first 10 encoding a millisecond timestamp and the last 16 encoding 80 random bits. Choose a count and generate up to twenty at once.
The alphabet omits I, L, O and U so the string cannot be confused with 1, 1, 0 or V when read aloud. The timestamp prefix means two ULIDs made at different milliseconds sort lexically in time order.
The random half comes from crypto.getRandomValues. The page shows each ULID's decoded UTC time and stores nothing; it is an identifier format, not a secret.
What the 26 characters contain
The first ten characters are a 48-bit count of milliseconds since the Unix epoch, written most-significant first. The remaining sixteen are 80 random bits. A decoder can therefore recover the creation time without a lookup table.
Crockford base32 uses digits and the letters A–Z except I, L, O and U. The page validates the shape and decodes the timestamp it generated, which is also how the sample time under each value is produced.
- 10 characters of timestamp (48 bits, milliseconds)
- 16 characters of randomness (80 bits)
- 26 characters total, uppercase
Ordering and uniqueness
Within one millisecond the prefix is identical, so the order is decided by the random half and is not creation order. Across milliseconds the lexicographic order follows the clock, which is the property that makes ULIDs useful as sortable keys.
The random half makes a collision unlikely but does not prove one cannot happen. The page generates values; it does not check them against any stored set.
How to use the count field
Set Count from 1 to 20 and press Generate again for a fresh batch. Each ULID is 26 uppercase Crockford base32 characters: 10 of millisecond timestamp followed by 16 of randomness, with the decoded UTC time shown under every value.
Values from different milliseconds sort in time order; values from the same millisecond share a prefix and order randomly. A ULID is an identifier, not a secret: the timestamp is readable, so use the token page for secrets.
What to Expect
Best for
- A sortable identifier for a new record
- A key whose creation time can be read back
- Test data with a realistic identifier shape
Not ideal for
- Secrets or passwords
- A guarantee of uniqueness across independent generators
- Replacing a UUID where the system expects the UUID format
What this tool keeps
- The 26-character uppercase form with the timestamp first
- A decoded UTC time under every generated value
- Your chosen count until the page is reloaded
What may need cleanup
- A count outside 1–20, which is clamped by the page
- A same-millisecond batch, whose internal order is random
- A downstream system that only accepts UUID strings
Common errors
- Treating the random half as a secret
- Assuming same-millisecond values sort by creation order
- Lower-casing the value before a case-sensitive comparison
Example use cases
- Generating a primary key for a new row
- Producing sortable IDs for a log
- Creating a batch of test identifiers
Sample input
A count of three at the current millisecond.
Sample output
Three 26-character ULIDs sharing a timestamp prefix, each with a decoded UTC time.
Who this is for
- Developers choosing a sortable identifier
- Testers who need realistic ID data
- Anyone comparing ULID and UUID behaviour
Frequently asked questions
How is a ULID different from a UUID?
A ULID is 26 Crockford base32 characters whose first 10 encode a millisecond timestamp, so generated values sort by time. A UUID version 4 is random and has no time prefix.
Do two ULIDs made in the same millisecond sort in creation order?
Not necessarily. The timestamp prefix is identical, so the order falls to the 80 random bits; across different milliseconds the prefix gives the order.
Is a ULID secret?
No. The timestamp is readable by anyone, and the random half is not a password. Use a token generator for secrets rather than an identifier format.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.