DevKits

NanoID Generator — 21-char URL-Safe Unique IDs

Generate NanoID strings online — 21 characters, URL-safe alphabet (a-Z, 0-9, -, _), same collision safety as UUID v4 in 40% less space. Bulk generate up to 1000 with custom length. 100% local.

Last updated:

Comments
  • smOeDv7FJvw6fOzXX5wnP
  • WV9HFan2FrMjgrajNRoXI
  • R9Rnhj2GzyGmjlNx9E54c
  • kNp4Q6dRdyet2yVGv7dhN
  • aHyLnAl7roJADeZSdFj5f

Frequently Asked Questions

What's the difference between NanoID and UUID?

Both use ~128 bits of entropy so the collision probability is essentially identical. NanoID's alphabet is 64 characters (A-Z, a-z, 0-9, -, _), so 21 characters carry the same information as a 36-character UUID — smaller URLs, database rows, and log lines with no safety trade-off.

Is NanoID URL-safe?

Yes. The default alphabet uses only URL-safe characters (letters, digits, - and _), so NanoIDs can appear in URLs without percent-encoding.

Can I change the length?

Yes — the length field accepts 2–64. Shorter IDs are more collision-prone: at length 8 you need to worry about collisions after ~200k IDs; at 21 (the default) you can generate a billion IDs a year for centuries.

Related Tools