<!-- Markdown version of https://ocxly.com/nanoid-generator.html · auto-generated, may lag the live page -->

# NanoID Generator

Generate compact, URL-safe NanoIDs with a custom size and alphabet — an unbiased, cryptographically-random alternative to UUIDs. See the entropy live. Runs in your browser.

### How it works

NanoID builds an identifier by drawing cryptographically-secure random bytes with `getRandomValues` and mapping them onto your chosen alphabet using a bitmask — rejecting out-of-range values so every character is **uniformly likely** (no modulo bias). The default 21-character URL-safe ID has ~126 bits of entropy, comparable to a UUID but shorter and safe in URLs.

---
*Source: [ocxly.com/nanoid-generator.html](https://ocxly.com/nanoid-generator.html) — OCXLY, free 100% client-side privacy-first tools. Free NanoID generator. Create compact, URL-safe, cryptographically-random IDs with a custom size and alphabet, and see the entropy live. Unbiased generation, entirely in your browser.*
