Nano ID Generator

Generate compact random IDs with your chosen length and alphabet.

Identifiers & Test Data
Preparing your generator…

Settings

Preparing your generator…

Output
Your result will appear here.

How to use

  1. Choose the quantity, ID length, and alphabet.
  2. Generate a fresh batch in your browser.
  3. Copy your IDs or download text, JSON, or CSV.

Working with Nano IDs

Nano IDs are compact random identifiers. The default uses 21 characters from a URL-friendly alphabet containing letters, digits, _ and -.

Customize the length or character set for test records and application fixtures. This browser tool follows Nano ID’s random-alphabet approach; it does not run your application’s code.

Selecting random characters

Random bytes come from Web Crypto. Values outside the chosen alphabet are rejected instead of being wrapped with a modulo operation, so each character has an equal chance of selection.

Example Nano ID batch
Settings
length = 21; count = 2
Example output
V1StGXR8_Z5jdHi6B-myT
Uakgb_J5m9g-0JDMbcJqL

Two illustrative IDs using the default alphabet and length.

Length and collision probability

Choose 1–128 characters. A custom alphabet must contain 1–94 distinct printable ASCII characters, without spaces. Shorter IDs and smaller alphabets increase collision probability; this tool does not promise unique IDs.

Stable batch exports

Changing length or alphabet requires a new generation. Changing output format keeps the current IDs. JSON escapes special characters; CSV quotes values when necessary.

Processing limits

Up to 1,000 values per batch. Nano IDs support lengths from 1 to 128 and 1–94 distinct printable ASCII characters. Integers use the signed 64-bit range. Generation runs locally, with a 10-second time limit.

?

Frequently asked questions

What is the default alphabet?

A–Z, a–z, 0–9, underscore, and hyphen: 64 URL-friendly characters.

Is the default length 21?

Yes. You can choose a length from 1 to 128 characters.

Can I use emoji in a custom alphabet?

No. This tool accepts distinct printable ASCII characters only, without spaces.

Are IDs guaranteed to be unique?

No. Collision probability depends on alphabet size, ID length, and how many IDs you create.

Are the generated IDs uploaded?

No. Generation and export happen in your browser.

Find your next tool

Language

Switch language? Your current work will be cleared. Copy or download it first.