Nano ID Generator
Generate compact, URL-safe Nano IDs with custom alphabet and size — using the nanoid library.
About this tool
The Nano ID Generator creates small, secure, URL-friendly unique identifiers using the nanoid library. The default output is a 21-character string from a URL-safe alphabet (A-Za-z0-9_-), chosen with cryptographically secure randomness. You can customise the length (4–64 characters) and provide a custom alphabet for domain-specific ID formats.
Nano IDs are a popular alternative to UUIDs in JavaScript/TypeScript applications: they are more compact (21 vs 36 characters), URL-safe by default, and have no hyphen separators. The collision probability of a 21-character Nano ID (with the default alphabet of 64 characters) is comparable to UUID v4 for practical purposes.
Custom alphabets let you generate IDs that match specific constraints: lowercase-only for case-insensitive systems, numeric-only for numeric identifiers, or any character set your application requires. All generation uses the browser's crypto.getRandomValues — no server, no network request.
Frequently asked questions
How does Nano ID compare to UUID?
When should I use a custom alphabet?
What length should I use?
Is Nano ID cryptographically secure?
Related tools
ULID Generator
Generate sortable ULIDs (Universally Unique Lexicographically Sortable Identifiers) in bulk.
UUID Generator
Generate UUID v1, v4, and v7 identifiers in bulk — using crypto-random browser APIs.
Random String Generator
Generate random strings with custom charsets and presets for API keys, tokens, and PINs.