Skip to content

Nano ID Generator

Generate Nano IDs — shorter than a UUID, and URL-safe by design.

Quick Tool Overview

The Nano ID Generator produces URL-safe identifiers with a length and alphabet you choose, and reports the collision probability for those settings — which is the number that decides how short you can safely go.

What it does
Generates Nano ID identifiers
You give it
A length, an alphabet and a quantity
You get back
IDs plus a collision estimate
Best for
Short public identifiers in URLs and filenames
Developer Tools Free, unlimited use No sign-up Runs in your browser

About the Nano ID Generator

Nano ID is a 21-character identifier over a 64-character URL-safe alphabet, which gives it about 126 bits of randomness — essentially the same as a UUID v4 in nine fewer characters and with no hyphens to escape.

The length and alphabet are both adjustable, which is the point of the format: a shorter ID for something with few rows, a longer one for something with many. The tool reports the collision probability for whatever you choose, expressed as how many IDs you would have to generate per second, for a year, to reach a one-per-cent chance of a single collision. That is a far more useful number than a bit count when you are deciding how short you can safely go.

Key features of the Nano ID Generator

Collision probability, not just bits

How long you could generate at a given rate before a collision becomes likely — far more useful than an entropy figure when choosing a length.

URL-safe by default

The standard 64-character alphabet passes through URLs, filenames and HTML attributes with no escaping.

Any alphabet

Restrict to digits, lowercase or a set you type, for formats with their own constraints.

Cryptographically random

Drawn from the browser’s secure source with rejection sampling, exactly as the reference implementation does.

Bulk output

Up to a thousand at once, one per line, ready to copy or download.

How to use the Nano ID Generator

  1. 1

    Set the length

    21 is the default. Shorter is prettier and riskier; the collision figure quantifies it.

  2. 2

    Choose the alphabet

    The URL-safe default, or restrict it to digits, lowercase or a set you type.

  3. 3

    Read the collision estimate

    How long you could generate IDs at a given rate before a collision becomes likely.

  4. 4

    Generate in bulk

    Produce up to a thousand at once and copy or download them.

Frequently asked questions

A 21-character Nano ID has about 126 bits of randomness against a UUID v4's 122, in 21 characters rather than 36. It is also URL-safe without escaping, which a UUID's hyphens technically are too but look worse.

Reviews of the Nano ID Generator

What people who use the Nano ID Generator think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the Nano ID Generator. It takes half a minute and no account.

Write the first review

More developer tools