HCODX/Nano ID Generator
100% browser-based · CSPRNG · URL-safe

Nano ID Generator

Generate cryptographically secure, URL-safe unique IDs in your browser. Pick the length, the alphabet, and how many you want. Uses crypto.getRandomValues — the same secure RNG the official nanoid library uses.

Options
Use ranges like A-Z, a-z, 0-9. Literals like _ and - are kept. Maximum 1000 IDs at once.
Generated IDs
Behaviour
UUID v4 Generator
ID length
21
Alphabet size
64
Count
0
Status
Ready
Example

10 Nano IDs, URL-safe alphabet

Length 21 with the default 64-symbol alphabet (A-Z, a-z, 0-9, _, -) gives ~149 bits of entropy — comparable to UUID v4.

Settings
length: 21
alphabet: A-Za-z0-9_-
count: 10
Generated IDs
V1StGXR8_Z5jdHi6B-myT
KE3jbN0vlxOaY-r9R8AfQ
uwT_3PpSc4XJgKzcLrYi1
…
Use cases

Where Nano ID shines

Shorter than UUID, URL-safe, cryptographically secure. Great for keys you put in URLs.

Security tokens

Short-lived tokens for password reset, magic links, share links.

API keys

Generate keys without external state — collision odds are vanishing.

Database IDs

URL-safe primary keys; shorter than UUIDs, copy-paste friendly.

File names

Random, collision-resistant names for uploads and temp files.

Step by step

How to generate Nano IDs

1

Set the length

Default 21 chars gives ~149 bits of entropy.

2

Pick an alphabet

Default is URL-safe. Use only digits, lowercase, or anything custom.

3

Pick how many

From 1 to 1000 at once.

4

Click Generate

Copy as a list, or download as a .txt file.

FAQ

Frequently asked questions

Nano ID is a tiny, URL-safe unique ID generator created by Andrey Sitnik. The default 21-character ID has ~149 bits of entropy — comparable to UUID v4 in collision resistance, but shorter and friendlier in URLs.

Yes when generated from a CSPRNG. This tool uses crypto.getRandomValues() — the same source the official library uses. The output is unbiased across the full alphabet.

Yes. Set any characters in the Alphabet field. Use range notation like A-Z, 0-9. To use only digits set 0-9; for hex, 0-9a-f; for a phonetic-friendly set, omit confusable letters.

Default 21 is a safe choice for any scale. Shorter (10–14) is fine for small datasets. Use the Nano ID collision calculator to size for your throughput.

Yes. Runs entirely in your browser. No signup, no upload, no logs.

About

About Nano ID

Nano ID is a unique-ID generator created by Andrey Sitnik in 2017. It produces short, URL-safe, cryptographically random IDs and has become a popular alternative to UUID v4 in JavaScript and beyond.

Why Nano ID

  • URL-safe — only A-Z, a-z, 0-9, _, - in the default alphabet.
  • Cryptographic — uses CSPRNG, unbiased modulo reduction.
  • Compact — 21 chars vs. UUID's 36, while keeping equivalent entropy.
  • Customisable — pick any alphabet and length.

How this tool works

  • Reads N random bytes via crypto.getRandomValues.
  • Maps each byte to an alphabet character with modulo reduction.
  • Optional appending to keep adding IDs without losing the previous list.
Related

Related tools