NanoID Generator
Generate secure, custom-length, unique NanoIDs with custom alphabets and collision probability calculations.
Generators
Generated NanoIDs
Configuration Analysis
Entropy:116.6 bits
1% Collision Risk Time (at 1k IDs/sec):2 million years
For a 1% collision probability, generating 1,000 IDs per second, it would take the duration shown above to experience at least one duplicate ID. Higher entropy results in lower risk.
What is a NanoID?
NanoID is a tiny, secure, URL-friendly, unique string ID generator. It is similar to UUID but is designed to be more compact, faster, and customizable. Standard NanoIDs use a 21-character alphabet containing letters, numbers, and symbols (A-Za-z0-9_-).
Key Advantages of NanoID
- Compact: It is shorter than UUID v4 (21 characters vs 36 characters) but offers equivalent collision resistance.
- Fast: It is up to 60% faster than UUID because it uses a custom random generator algorithm instead of the standard UUID specification.
- Customizable: You can specify your own custom alphabet and length to fit specific needs, such as numeric-only pins, hexadecimal keys, or readable voucher codes.
- Safe: It uses the Web Crypto API in browsers to generate cryptographically strong random values.
How to Use
- Adjust Length: Select how long you want each ID to be (default is 21 characters).
- Choose Alphabet: Select a pre-configured alphabet (e.g., URL-friendly, Numbers, Hexadecimal, or Readable No-Lookalikes) or type your own characters in the text field.
- Set Count: Determine how many IDs you want to generate (1 to 100).
- Copy Output: Click on any single generated ID to copy it, or use the “Copy All” button to copy the entire list.
- Analyze Collision Risk: View the live entropy and collision risk calculations at the bottom of the page based on your custom length and alphabet size.