Nano ID Generator
Create URL-safe, compact random IDs (Nano ID). Configurable length and alphabet, ideal as UUID alternative.
Last updated: April 2026 ยท Runs in your browser ยท No sign-up
- WQG64LMgSdFYlTHp5F3Dt
When to choose Nano ID
Nano ID shines when you need random IDs that fit in URLs, show up in logs, or get typed by humans. The 21-character default is 40% shorter than a UUID while providing comparable uniqueness.
Size vs collision trade-off
- 21 chars (default) โ uniqueness comparable to UUID v4.
- 10 chars โ fine for โค1M IDs per namespace.
- 36 chars โ overkill for practically any workload.
Frequently Asked Questions
How is Nano ID different from UUID?
Nano ID is shorter (default 21 chars vs UUID's 36), URL-safe without encoding, and uses a 64-character alphabet. For the same collision probability as UUID v4, a 21-char Nano ID suffices.
What's the collision probability?
With the default 21-char ID, you'd need to generate 149 billion IDs to have a 1% chance of collision. Good enough for virtually any application.
Can I use a custom alphabet?
Yes. Common variants: alphanumeric only (no dash/underscore), lowercase only, or numeric-only for PINs. Shorter alphabets mean longer IDs for the same entropy.
Is it cryptographically secure?
Yes. We use the Web Crypto API (crypto.getRandomValues) โ the same source as UUID v4 and password generators.