Nanoid Generator Online — URL-Safe Compact IDs
Generate Nanoid-style IDs in your browser with a cryptographic random source. Set the size from 2 to 64, pick an alphabet (URL-safe, alphanumeric, numeric, no look-alike or custom) and create up to 50 IDs at once.
NanoID vs UUID
NanoID solves the same problem as a UUID, unique IDs, but trades the fixed 128-bit RFC layout for a shorter, URL-safe string. The default alphabet has 64 URL-friendly characters. Set the length with the slider or the number field (2 to 64) or a preset, and switch to numeric, alphanumeric, no-look-alike or a custom alphabet (at least two different characters). Shorter IDs are easier to copy but collide more often as volume grows. No length fits every case: match it to your storage format and how many IDs you will create. Generation uses rejection sampling with crypto.getRandomValues in your browser. For standard UUID v4 or v7, or ULIDs that sort by time, use the UUID generator or the ULID generator.
How generation works
Set the size with the slider, the number field or a preset, from 2 to 64. Pick an alphabet and a count up to 50. The list is filled when the page opens and generated again each time you change an option. Randomness comes from crypto.getRandomValues with rejection sampling, never Math.random. Copy one line, copy all, or download a .txt file.
Options
- Size (2–64)
- Longer IDs mean fewer collisions. Use the slider or the number field for any length from 2 to 64, or select a preset (8, 12, 16, 21, 32).
- Alphabet
- URL-safe uses uppercase and lowercase letters, digits, underscore and hyphen, the Nanoid default. Alphanumeric drops the underscore and hyphen. Numeric keeps the digits only. No look-alike removes 0, O, o, I, l and 1. Custom uses the characters you paste.
- Count (1–50)
- Several IDs for a set of fixtures, up to 50.
- Custom alphabet
- Paste any string of up to 256 characters. Repeated characters are dropped and at least 2 different ones must remain. The entropy shown uses the size of that cleaned-up alphabet.
Examples
Default URL-safe
Settings
Output
Short numeric
Settings
Output
Related utilities
Need UUIDs? Use the UUID generator. For IDs that sort by time, the ULID generator.
Nanoid generator FAQ
Compact IDs
Can I type a custom size?
Yes. Use the slider or the number field for any length from 2 to 64. The presets are only shortcuts.
Custom alphabet?
Yes. Select Custom and paste your characters (up to 256, at least 2 different ones). Emoji and other Unicode code points work, but a character made of several code points is split into its parts.
Is data uploaded?
No. IDs are generated in your browser and nothing is sent to FastMinify.
Why not the npm nanoid package?
The page uses a few lines of its own: crypto.getRandomValues with rejection sampling, the same approach as our password generator. Every character of the alphabet has the same chance, and no extra package is loaded.
What length should I choose?
Longer IDs lower the chance of a collision. The URL-safe default uses 21 characters, like the Nanoid library. Use the slider for any length from 2 to 64, or a preset (8, 12, 16, 21, 32). A numeric alphabet needs more characters than a mixed one for the same entropy.
Developer utilities
Timestamps, UUID, ULID, Nanoid, cron, passwords, regex, slugs, number bases, letter case, text diff, chmod and Lorem Ipsum, all in your browser.
Explore other tool categories
- Minify
Minify JavaScript, CSS, HTML, JSON, XML, SVG and other formats to cut the bytes you ship, before gzip or a CDN.
- Unminify
Make minified code readable again to debug or review it. Unminify JavaScript, CSS, TypeScript, SCSS, LESS, SQL, YAML and other formats.
- Conversion
Convert data between JSON, YAML, XML, CSV, TOML and other formats locally, with no upload to a server.
- Encoding
Encode or decode Base64, URLs, HTML entities and JWTs, and generate hashes and HMACs in your browser.
- Serialization
Serialize and deserialize PHP data structures beside JSON workflows.
- JSON Tools
Validate, format, repair, compare and explore JSON in your browser, alongside the JSON minifier and converters.
- SVG Tools
Preview, optimize with SVGO, export as a data URI, resize, beautify, convert to JSX and validate SVG in your browser.
- Beautify
Make code readable with consistent indentation. Beautify JavaScript, CSS, TypeScript, SCSS, LESS, Markdown, GraphQL, SQL, YAML and more in your browser.
- CSS preprocessors
Compile SCSS or LESS to standard CSS in your browser. Pair it with beautify or minify to handle a whole stylesheet.
- Color & CSS Tools
Check WCAG contrast, convert CSS colors and units, and generate shades, border-radius and box-shadow code in your browser.
- DevOps & Infra
Terraform HCL format/validate/minify, Dockerfile format & lint, Docker Compose and .env validation.
- CI/CD
Format GitHub Actions and GitLab CI YAML and check the structure of workflows and jobs in your browser.
- Logs & observability
Format, filter and validate JSON and NDJSON logs, and turn Nginx or Apache access logs into CSV or TSV.
- Kubernetes
Multi-doc manifests, structural validate, Ingress/Deployment starters, and Helm values formatting.
- Networking / IP
Subnet calculator, IP converter, range to CIDR, CIDR summarize and IP-in-subnet checks for IPv4 and IPv6, in your browser.
- Security & tokens
Inspect JWKS, verify JWTs, decode X.509 certificates, convert PEM and JWK, scan text for secrets and hash with bcrypt in your browser.
- API & schemas
Format, validate, lint and convert OpenAPI, JSON Schema and GraphQL SDL in your browser.
- HTTP Tools
Paste cURL commands, HTTP messages, URLs, HAR files and Cookie or Set-Cookie headers to format and inspect them. Nothing is sent.
- SEO / Web Tools
Generate meta tags, Open Graph, Twitter Card, robots.txt, sitemap.xml and JSON-LD in your browser. Previews come from your input, and your site is never fetched.
- Text & Markdown
Count words, build Markdown tables of contents, turn CSV into Markdown tables and sort or deduplicate lines in your browser.
- AI & LLM
Count tokens, estimate API costs, check context-window fit, convert JSON to TOON and analyze prompts, all in your browser.
- Test Data
Dummy names, emails, phone numbers, addresses, dates, IBANs, card numbers and JSON, CSV or SQL rows for fixtures and database seeds. Everything is generated in your browser.
- Barcode labels
Draw Code 128, EAN-13 and UPC-A labels and static QR codes in your browser, then download PNG or SVG. This is not a GS1 lookup.