Skip to content
Marvin's Toolbox.

Search tools

Type to filter all tools

Nano ID Generator

Generate Nano IDs in bulk with full control over length and alphabet. Pick the default, hex, numbers-only or a custom character set, see the collision probability for your settings, and copy the results as a plain list.

Everything runs locally in your browser. Your data never leaves your device.

Letters, digits, hyphen and underscore. The stock nanoid alphabet, 64 characters.

Result

Generating…

Collision risk

Bits per ID
126
log2 of 64^21 possible IDs
Possible IDs
2^126
64 characters at length 21

Generating 1,000 IDs per hour, it would take longer than the age of the universe, or about 1.3 quintillion IDs, to reach a 1% chance of at least one collision.

Next steps

Send this tool's output straight into another tool.

Convert text into every case at once: title case in the APA, AP, Chicago, MLA, Bluebook, AMA and NYT styles, sentence case, upper, lower, camelCase, snake_case, kebab-case and more, each with its own copy button.

Count words, characters, sentences, paragraphs, lines and more as you type, with estimated reading and speaking time.

Remove duplicate lines from a list or text, keeping the first occurrence. Optionally ignore case and whitespace, or drop blank lines too.

Replace text in two modes: plain find and replace all, or regular expressions with flag controls and capture group references like $1.

Compare two texts and see every added, removed and changed line highlighted, side by side or inline, with the changed words marked within each line. Ignore case, whitespace or blank lines, read a summary of how much changed, and export the result as a unified diff.

Paste a UUID to see what it carries: version, variant, and for time-based versions the exact timestamp, clock sequence and node. Also shows the raw bytes, the 128-bit integer and the URN form.

Decode Base64 to text or encode text to Base64. Paste into the top box, read the result below, and flip the direction with one click. Handles Unicode correctly, reads URL-safe Base64, and shows binary payloads as a hex dump you can download.

Convert numbers between binary, octal, decimal, hexadecimal and any base up to 36. Type into any field and the others update as you go. Handles huge integers without losing precision and accepts 0x, 0b and 0o prefixes.

Convert between scientific notation and full numbers as you type. Reads 1.23e5, 1.23 × 10^5 and plain numbers, shows the value written out, in normalized scientific notation and in engineering notation, and can round to any number of significant digits.

About the Nano ID Generator

This tool generates Nano IDs, the short URL-safe identifiers popularized by the nanoid library. Set any length from 2 to 64 characters, pick an alphabet, and generate a single id or a list of up to 1,000.

The collision calculator answers the question that actually matters when you shorten ids: at your generation rate, how long until there is a 1% chance of two ids colliding.

What you can do

  • Generate a Nano ID in the default 21-character URL-safe format.
  • Generate ids from a hex, lowercase, numbers-only or no-lookalikes alphabet.
  • Use a custom alphabet with exactly the characters you want.
  • Pick a shorter or longer id length for your use case.
  • Calculate the collision probability for a given length, alphabet and rate.
  • Generate up to 1,000 ids at once, then copy or download the list.

How to use the Nano ID Generator

  1. 1Set the length. 21 is the nanoid default and matches UUID-level uniqueness.
  2. 2Pick an alphabet preset, or choose Custom and type your own characters.
  3. 3Set how many you need and click Regenerate for a fresh batch.
  4. 4Check the collision risk section: enter your generation rate and read how long your settings stay safe.
  5. 5Copy the result, or download the list as a text file.

How the randomness works

Every character is drawn from the Web Crypto API's cryptographically secure random number generator, using the same masked rejection sampling as the reference nanoid: random bytes are masked down to the smallest power of two covering the alphabet, and values beyond it are thrown away instead of wrapped around. A naive byte % size mapping would slightly favor the start of the alphabet, this approach keeps every character exactly equally likely.

A custom alphabet is cleaned up as you type: repeated characters are dropped, and anything from 2 to 256 distinct characters works, emoji included.

Reading the collision estimate

The calculator uses the birthday approximation, the same math as the well-known nanoid collision calculator: with an alphabet of N characters and ids of length L there are N^L possible ids, and the chance of a duplicate grows with the square of how many you have made. The tool reports how many ids, and at your rate how much time, it takes to reach a 1% chance of at least one collision.

The default settings, 21 characters from a 64-character alphabet, give about 126 bits per id, in the same league as a random UUID's 122 bits. Shorter ids can be perfectly fine, the estimate tells you exactly how far you can go for your volume.

Nano ID, UUID or ULID

Nano IDs are the compact choice for URLs, slugs and short codes, and the alphabet control makes them fit places with strict character rules. If you need the standard 36-character format most databases and APIs expect, use the UUID Generator. If your ids should sort by creation time, use the ULID Generator, which puts a timestamp in front of the randomness.

Enter a resolution to get its simplified aspect ratio, or start from a ratio and one side to get the missing dimension. Knows the common ratios like 16:9, 4:3 and 21:9 and shows how close your size is to each.

Create barcodes in dozens of formats, from EAN-13, UPC-A and Code 128 to QR Code, Data Matrix and PDF417. Type the content, tune the size, colors and text options, and download the result as PNG or SVG.

Decode Base64 to text or encode text to Base64. Paste into the top box, read the result below, and flip the direction with one click. Handles Unicode correctly, reads URL-safe Base64, and shows binary payloads as a hex dump you can download.

Verify a checksum online: drop a file, paste the expected checksum and see instantly whether they match. The hash type is detected from the checksum itself, covering MD5, SHA-1, SHA-256, SHA-512, BLAKE3, CRC-32 and more, and sha256sum lines or whole checksum files can be pasted as-is.

Convert Unix file permissions between checkboxes, octal like 755 and symbolic notation like rwxr-xr-x, all kept in sync as you edit any of them. Covers setuid, setgid and the sticky bit, and shows the matching chmod command ready to copy.

See what your clipboard really holds. One press lists every format on it, from plain text and HTML to Excel tables and images, each with its type, size and a preview. Pasting works too, and can reveal even more formats.