NanoID generator

Create compact unique identifiers in NanoID format, with a customizable length and alphabet. IDs are generated right in your browser using the native cryptographic API: nothing is sent to a server.

Edit the list of possible characters (e.g. digits only, or lowercase letters only) to adapt the ID format.
5 ID(s)
  • OgsPs_kKAz9Nrz9nYU0Xj
  • MXGWemGS4YhQIT2O2NlNd
  • QC8nj5PlZPq0tj9NJvDZQ
  • jGh0bncNrvJtOIPRyipJy
  • tOHPeoQqoy2i_Rlu2a0q6

How it works

NanoID is a short, safe, URL-safe identifier format, increasingly used in place of UUIDs for database keys, file names or session identifiers. This tool reproduces the official algorithm: it draws cryptographically secure random bytes, filters them with a bitmask to avoid any distribution bias, then converts them into characters from the chosen alphabet.

Is NanoID as reliable as a UUID v4?

Yes. With the default 64-character alphabet and a length of 21 characters, the collision probability is comparable to that of a standard UUID v4, while producing an identifier that is shorter and easier to read in a URL or file name.

Why customize the alphabet?

A restricted alphabet (for example digits only, or lowercase letters without ambiguous characters like "0" and "o") is useful for codes meant to be read or copied by hand, such as promo codes or order references.

IDs are computed entirely locally using your browser's crypto.getRandomValues; no generated value ever leaves your device.