How it works
A ULID is a 128-bit identifier encoded as 26 Crockford base32 characters: 48 bits of millisecond timestamp followed by 80 bits of randomness. The timestamp prefix makes ULIDs sortable — sorting the strings sorts the creation times — which is their killer feature over UUIDv4 for database primary keys: inserts append near the end of the index instead of scattering across it, and the id itself tells you when the row was created.
A Nano ID takes the opposite philosophy: pure randomness in a compact, URL-safe alphabet (a-z A-Z 0-9 _ -). At the default 21 characters it carries about 126 bits of entropy — comparable to UUIDv4's 122 — in a shorter string with no hyphens, which is why it shows up in URLs, file names and client-generated keys.
Both modes draw randomness from crypto.getRandomValues, the browser's CSPRNG — never Math.random. ULIDs generated within the same millisecond get monotonically increasing random components in the official spec; this generator uses fresh randomness per ID, which preserves uniqueness and lexicographic order within the batch because the timestamp dominates.
Generate one ID or batches of 5, 10 or 25, copy individually or all at once. Everything happens locally — generated IDs are never transmitted or logged.
Worked example
One ULID decomposes into two readable halves: ten time characters, sixteen random characters.
| Part | Example | Meaning |
|---|---|---|
| Time (10 chars) | 01JQXK5S40 | Milliseconds since epoch, Crockford base32. |
| Random (16 chars) | 8V3M2K7Z9QWERTYH | 80 bits of CSPRNG randomness. |
| Full ULID | 01JQXK5S408V3M2K7Z9QWERTYH | 26 chars, sortable by creation time. |
- Pick the format: ULID for time-ordered database keys, Nano ID for opaque URL-safe strings.
- Set the batch: Generate 1, 5, 10 or 25 IDs at once; adjust Nano ID length if needed.
- Copy what you need: Copy a single ID or the whole batch with one click.
- Store deliberately: Use ULID where time-order helps, Nano ID where opacity helps.
Two ULIDs generated a second apart sort in creation order as plain strings — no parsing needed. A Nano ID such as V1StGXR8_Z5jdHi6B-myT encodes no time at all; it is opaque by design.
Common errors and edge cases
- ULIDs leak creation time. Anyone reading the ID learns when the resource was created. If that metadata is sensitive, use Nano ID or UUIDv4 instead.
- Crockford is not Base64. ULIDs exclude I, L, O and U to avoid visual confusion and accidental words. Do not feed a ULID to a Base64 decoder.
- Entropy scales with length. A 10-character Nano ID has about 60 bits — fine for short links, not for unguessable tokens. Keep 21+ for security-relevant uses.
- Math.random is not acceptable. Predictable seeds make predictable IDs. This tool uses crypto.getRandomValues for every byte.
- Uniqueness vs secrecy. Both ID types are unique with overwhelming probability, but uniqueness is not authorization — never treat an ID as a capability without server-side checks.
Code equivalents
Both formats have tiny reference implementations in every ecosystem. These generate the same values server-side.
| Language | Example |
|---|---|
| JavaScript | ulid() from the ulid package; nanoid() from nanoid — both CSPRNG-backed. |
| Python 3 | ulid.new().str with python-ulid; secrets.token_urlsafe(16) for a Nano-ID-style token. |
| SQL (Postgres) | gen_random_uuid() for UUIDv4; ULID columns are typically stored as text with a generated sort. |
Related tools
Frequently asked questions
When should I choose ULID over UUID?
When the ID becomes a database key you sort or range-scan by time. ULIDs cluster inserts at the index edge and sort lexicographically by creation; UUIDv4 is better when you want opacity and wide driver support.
Is a Nano ID as unique as a UUID?
At the default 21 characters, a Nano ID carries ~126 bits of entropy versus UUIDv4's 122 — collision odds are comparable (astronomically small) at a shorter length.
Can I extract the creation time from a ULID?
Yes. The first 10 characters are the millisecond timestamp in Crockford base32. Decode them and convert with the timestamp converter.
Are these IDs safe for secrets or tokens?
They are generated with a CSPRNG and are unguessable at sufficient length, but IDs are identifiers — use dedicated token formats and server-side checks for authentication.
Why does the ULID alphabet skip I, L, O and U?
Crockford base32 removes visually ambiguous letters (I/L vs 1, O vs 0) and U to avoid forming common words, making IDs safer to read, type and print.
Privacy note
All processing happens in your browser. The values you enter never leave your device and are never transmitted to ToolPlex.