ULID & NanoID Generator
Generates sortable ULIDs or short NanoIDs with a chosen alphabet and length, and shows collision odds.
Generates ULIDs and NanoIDs — the two short-id formats people reach for when a 36-character UUID is too long for a URL. It also shows the collision arithmetic for whatever length and alphabet you chose, which is the part that decides whether the id is short enough or too short.
26 characters, sortable, with a millisecond timestamp in the first ten.
0 ids
How likely is a collision
Entropy
80.0 bits
Ids before a 1% chance
1.56e11
At 1,000 per hour
18 thousand years
The birthday bound: P ≈ 1 − exp(−n²/2N). The number below is where that reaches one percent.
Decode a ULID
ULIDs follow the ULID specification: 48 bits of millisecond timestamp then 80 random bits, in Crockford base32 — which leaves out I, L, O and U so nobody misreads one aloud.
How to use it
Choose ULID or NanoID
A ULID is a fixed 26 characters with a millisecond timestamp in the first ten, so it sorts. A NanoID is any length over any alphabet and is pure entropy — nothing about it is ordered.
Set the length and alphabet
For NanoID, the default is 21 characters over 64 symbols. A shorter id or a smaller alphabet — say a no-lookalike set for something people read aloud — costs entropy, and the panel below shows exactly how much.
Read the collision line
It gives the number of ids before a one-percent chance of any collision, and how long that is at a thousand a day. Under 64 bits of entropy the page says so, because that is the line between a URL slug and something that must not be guessable.
Decode a ULID if you have one
Paste it and the panel prints the creation time and the random tail — useful for working out when a record was actually made.
Common questions
Is a short id safe as a secret link?
Only if its entropy says so. A 21-character NanoID has about 126 bits and is fine; a 10-character one has around 60 and is guessable by anyone willing to spend money. The page flags anything under 64 bits for exactly this reason — a short id is a short id, not a secret.
Why does a custom alphabet still come out uniform?
Because symbols are drawn with rejection sampling rather than `random % length`. The modulo shortcut biases every alphabet whose length does not divide 256 — the common bug in hand-rolled id generators, and invisible until someone counts.
What does Monotonic do for a ULID?
Within a single millisecond, plain ULIDs are in random order relative to each other. Monotonic mode increments the random field instead of redrawing it, so a burst generated in the same millisecond still sorts in the order it was created.
Why does a ULID use base32 without I, L, O and U?
That is Crockford’s alphabet: it drops the characters that get confused when a human reads an id aloud or copies it off a screen. The tradeoff is 32 symbols instead of 36, which is why a ULID needs 26 characters where a NanoID needs 21.
Feed it from
Next
These accept what this tool produces, so the result can go straight in.
Password Generator
Generates random passwords with length, character set and ambiguous-character rules, in bulk if needed.
Random Key Generator
Generates cryptographic random bytes as hex, Base64 or Base64URL at a chosen length, for app secrets.
UUID Generator
Generates UUID v1, v4, v5 and v7 in bulk, and decodes the timestamp out of a v1 or v7 value.
Base64 Encoder & Decoder
Encodes and decodes Base64 and Base64URL for text or files, handling UTF-8 correctly.
curl to Code
Converts a curl command into fetch, axios, Python requests, Go, PHP or PowerShell.
Text Hash
Computes MD5, SHA-1, SHA-256, SHA-384, SHA-512 and CRC-32 of a string, with an uppercase and Base64 output option.