Skip to content
ToolMug

Nano ID Generator

Generate Nano IDs, random IDs that are shorter than UUIDs and safe to put in a URL — handy for short links, file names, component keys and database keys. Set the length and the page estimates how many IDs you can create before a duplicate becomes likely.

Runs in your browser — nothing you enter is uploaded

Short, URL-safe random IDs with a configurable length.

About 1,307,660.5T IDs before a 1% chance of any collision.

21

Inspect an ID

How to use

  1. Set the length with the slider. The default is 21 characters.
  2. Choose how many. They are generated straight away; click Generate for a new batch.
  3. Copy the list or download it as a text file.

Options explained

Alphabet
64 URL-safe characters — A–Z, a–z, 0–9, underscore and hyphen. Each character carries 6 random bits.
Length
6 to 64 characters. The default 21 characters hold 126 random bits, about as collision-resistant as UUID v4 (122 bits).
Collision estimate
Shown under the list — how many IDs of the current length you can generate before there is a 1% chance of any duplicate.

Example

V1StGXR8_Z5jdHi6B-myT

The default length is 21 characters.

Frequently asked questions

What length should I use?

For globally unique IDs, keep the default 21 characters — about 1.31 × 10¹⁸ IDs before a 1% chance of a duplicate. For IDs used only in a small scope, such as elements on one page, 8–12 characters is enough; 10 characters reach a 1% chance after about 152 million IDs.

Why use Nano ID instead of UUID?

It is shorter for the same randomness (21 characters versus 36) and every character is URL-safe, so nothing needs escaping. The trade-off is that there is no format standard and databases have no native type for it.

Can I use it for tokens or password-reset links?

Yes. Characters are picked with crypto.getRandomValues, which is unpredictable, without modulo bias. Use at least 22 characters (132 bits) for tokens.

Is anything uploaded?

No. IDs are generated in your browser and never sent to a server.

Privacy

This tool runs entirely in your browser. Your files and text are processed on your device and are never uploaded to our servers.

Related tools