NanoID generator
Generate short, URL-safe NanoID identifiers, a compact UUID alternative.
🔒 100% client-side — no data sent
Generate short, URL-safe NanoID identifiers, perfect for links, slugs or compact keys. Everything is produced with crypto.getRandomValues, 100% in the browser: no identifier is transmitted or stored elsewhere.
What is it for?
- ▸ Create short URLs or share codes.
- ▸ Generate compact identifiers for your entities.
- ▸ Replace an overly long UUID in an API.
- ▸ Produce unique, readable slugs.
FAQ
Is NanoID safer than a UUID?
At equal entropy, yes: its larger alphabet allows shorter IDs for the same level of uniqueness.
How many characters is a NanoID?
21 characters by default, using a URL-safe alphabet (A-Z, a-z, 0-9, _ and -), with adjustable length.
Can a NanoID collide?
It's extremely unlikely: at 21 characters, you'd need billions of IDs per second for years.
Can I use it in a URL?
Yes, its alphabet is URL-safe: no characters to encode and no risk of breaking a link.