Skip to content
TextArray
100% local

Nano ID generator

Generate short, URL-safe Nano IDs with cryptographically secure randomness.

Output

Nano ID generator

Generate Nano IDs — short, URL-safe unique identifiers — one per line, from one up to a thousand at a time. A standard Nano ID is 21 characters drawn from a 64-symbol alphabet (A–Z, a–z, 0–9, underscore and hyphen), which packs about 126 bits of randomness into a string a third shorter than a UUID. Every character comes from the browser's cryptographically secure random generator, with rejection sampling so no symbol is ever more likely than another.

Set the length anywhere from 2 to 128 characters and pick the alphabet that fits the job. Standard is the classic Nano ID set. No lookalikes drops the characters people confuse when reading ids aloud or retyping them — 0/O/o, 1/I/l/i and 5/S/s, plus the underscore and hyphen — leaving 51 unambiguous symbols, ideal for coupon codes and anything printed. Lowercase + digits suits systems that fold case, such as subdomains or email tags, and hex lowercase produces plain hexadecimal tokens.

Nano IDs shine wherever a UUID feels bulky: database keys you expose in URLs, short links, file names for uploads, cache keys, invitation codes and request ids in logs. At the default 21 characters the collision math is comfortably on your side — you would need to generate roughly a billion ids per second for over a century before reaching a 1% chance of a single collision.

Everything happens locally in your browser. The ids are generated on your device, never requested from a server and never logged anywhere, so they are safe to use in production systems straight from this page.

FAQ

What is a Nano ID?
A Nano ID is a short unique identifier popularized by the JavaScript nanoid library: 21 characters from a 64-symbol URL-safe alphabet (A–Z, a–z, 0–9, _ and -), generated from cryptographically secure randomness. It fits anywhere a string id fits — URLs, file names, HTML attributes — without escaping.
How likely are collisions?
A standard 21-character Nano ID carries about 126 bits of randomness, only slightly less than a UUID v4 (122 bits). Generating a billion ids per second, it would take over a century to reach a 1% probability of one collision. Shorter ids lower that safety margin quickly, so keep 21 characters unless the id space is small.
Nano ID vs UUID vs ULID — which should I use?
A UUID v4 is the interoperable standard: 36 characters with hyphens, supported everywhere. A ULID is 26 characters and sorts by creation time, which databases like. A Nano ID is the compact option: 21 characters, URL-safe, no fixed format requirements. If you control both ends and want short ids, Nano ID is a fine default.
What does the no-lookalikes alphabet remove?
It removes the classic confusable groups 0/O/o, 1/I/l/i and 5/S/s, plus the underscore and hyphen, leaving 51 unambiguous characters. Use it for ids people read aloud, print or retype — each character carries slightly less randomness, so add a character or two of length to compensate.
Are the generated ids sent anywhere?
No. The ids are generated in your browser with crypto.getRandomValues and never leave your device, so you can use them for production keys and secrets-adjacent values.