Nano ID Generator
Short, URL-safe, secure random IDs.
How to use
- 1 Choose the length of each ID.
- 2 Set how many IDs you want to generate.
- 3 Optionally replace the alphabet with your own character set.
- 4 Click Generate, then copy an individual ID or the whole list.
About Nano ID Generator
The Nano ID Generator creates compact, URL-safe, cryptographically strong random identifiers using the same algorithm as the popular nanoid library.
A Nano ID is a great alternative to a UUID when you want something shorter and friendlier in URLs: the default is a 21-character string drawn from a 64-symbol alphabet of letters, digits, underscore and hyphen, which packs more entropy into fewer characters than a hyphenated UUID while staying safe to drop into links, filenames and database keys.
You are in full control of the output.
Set the length to make IDs shorter for low-collision needs or longer for extra safety, generate a single ID or a batch of up to a thousand at once, and swap in a custom alphabet — for example digits only for numeric codes, or an unambiguous set that omits look-alike characters like 0/O and 1/l.
Whatever alphabet you choose, the generator uses unbiased rejection sampling so every character is equally likely and the result stays uniformly random.
Randomness comes from the browser Web Crypto API, the same secure source used for keys and tokens, so these IDs are suitable for things like public record identifiers, share links and tokens where guessability matters.
Each ID can be copied on its own or the whole batch copied together, and a Generate button gives you a fresh set on demand.
Everything happens locally on your device — no IDs are ever sent to a server — so the tool is fast, private and works offline once the page has loaded.
FAQ
How is a Nano ID different from a UUID?
Both are random identifiers, but a Nano ID is shorter and URL-safe by default (21 characters versus 36 for a UUID) and lets you pick the length and alphabet, while still using a secure random source.
Are the IDs cryptographically secure?
Yes. Randomness comes from the Web Crypto API, and unbiased rejection sampling keeps every character equally likely, so the IDs are hard to guess and suitable for tokens and public identifiers.
Can I use a custom alphabet?
Yes. Replace the alphabet field with any characters you like, for example digits only or a set without confusable characters. Shorter alphabets mean you may need a longer length for the same collision safety.