Nano ID Generator
Generate URL-safe Nano IDs with the real unbiased algorithm — choose the alphabet, length and count, see the exact entropy and collision odds, and export as lines / JSON / CSV / SQL.
What a Nano ID is
Nano ID is a tiny unique-string library. An ID is a run of
characters drawn uniformly at random from an alphabet — by default 21
characters from a 64-symbol URL-safe set
(A–Z a–z 0–9 _ -), which carries about the same
collision resistance as a UUID in fewer characters.
Why the algorithm matters
The naive approach — randomByte % alphabet.length — is
biased whenever 256 is not a multiple of the alphabet size, so some
characters come up slightly more often. This tool uses the real Nano
ID method: a bitmask plus rejection sampling, so every character is
exactly equally likely. A "fast (biased)" mode is offered only for
comparison.
Entropy and collisions
Each character contributes log2(alphabet size) bits.
The tool shows the total entropy and, for a number of IDs you choose,
the probability that any two collide (the birthday bound).
Seeded mode
Leave the seed blank for the browser CSPRNG. Set it and generation becomes deterministic — handy for fixtures, never for real IDs.
Privacy
Everything is generated in your browser. Nothing is sent anywhere.