Password Generator
Secure random passwords, EFF Diceware passphrases, and PINs — with real entropy + zxcvbn scoring
Generate cryptographically random passwords using window.crypto.getRandomValues(the browser's CSPRNG) with rejection sampling to avoid modulo bias. Pick between random characters (4-64 chars, all four classes, shell-safe option), EFF Diceware passphrases (7,776-word list, 3-10 words), or a numeric PIN. Every output shows real entropy in bits, a zxcvbn strength score, and an estimated crack time. Runs entirely in your browser — no upload, no history, no signup.
Generate a secure password
Cryptographically random (uses crypto.getRandomValues) — generated entirely in your browser.
Excludes backticks, quotes, backslash, $, ;, |, & — safe to paste in shells and SQL
How this generator stays secure
Cryptographic RNG. Every character is drawn from window.crypto.getRandomValues, the browser's built-in CSPRNG. We use rejection sampling to avoid modulo bias.
Runs locally. No password leaves your browser; nothing is sent to a server. The page works fully offline once loaded.
No history.Generated passwords are not stored anywhere — not in localStorage, not in a database. Once you navigate away, they're gone.
Open source. The generation logic is in app/generator/password-generator/_lib/and is audit-friendly — no external API calls.
Recommended lengths
Password recipes by use case
Different accounts need different defaults. These are the settings most security-conscious teams converge on. Example values are illustrative — don't reuse them; generate your own above.
Bank / password-manager master
High-stakes account — wraps everything else. Use a passphrase you can type from memory.
≈ 71 bits via 5 EFF words + 2-digit pad. Typeable; memorable after a day or two of use.
Standard website (password-manager filled)
Most accounts — you never type these, the manager autofills.
≈ 105 bits with all four character classes. Resists offline brute-force for past-the-heat-death-of-the-sun timescales.
Throwaway / disposable account
Forum signup, newsletter, anything you don't care about losing.
≈ 79 bits. Still strong; the floor is "won't collapse in a credential-stuffing attack."
SSH / GPG key passphrase
Local-only — typed by you when you unlock the key. Long passphrase beats a random 12-char here.
6 EFF words = ~77 bits. Local brute-force is bounded by the key-derivation function inside SSH/GPG, so length matters more than character variety.
Service account / DB credential
Pasted into a connection string, .env file, or shell command. Avoid characters that need escaping.
All 4 classes minus shell-unsafe symbols (no backticks, quotes, backslash, $, ;, |, &). Safe to paste into psql, JDBC URLs, .env files.
Phone / device unlock PIN
Numeric keypad only. Combined with device-side rate limiting, 6 digits is the sweet spot.
6 digits = ~20 bits. Device limits (wipe-after-N-fails on iOS / Android) make this enough; without rate limiting it'd be very weak.
Related tools
Password reference
The math behind password strength, how the three generation modes differ, and what the security industry recommends in 2026 — including the parts that have changed since the old “rotate every 90 days” era.
Bits of entropy: the only honest strength number
For a uniformly-random password drawn from a charset of size N with length L, entropy in bits is L × log₂(N). This is the number an attacker has to beat: with b bits of entropy, the attacker needs roughly 2^(b−1) guesses on average.
| Configuration | Charset size | Length | Entropy |
|---|---|---|---|
| Lowercase only | 26 | 8 | 37.6 bits |
| Lowercase + digits | 36 | 12 | 62 bits |
| All 4 classes | 94 | 12 | 78.7 bits |
| All 4 classes | 94 | 16 | 104.9 bits |
| All 4 classes | 94 | 20 | 131.1 bits |
| EFF passphrase (5 words) | 7,776 | 5 words | 64.6 bits |
| EFF passphrase (6 words) | 7,776 | 6 words | 77.5 bits |
| PIN (4 digits) | 10 | 4 | 13.3 bits |
| PIN (6 digits) | 10 | 6 | 19.9 bits |
Threshold rules of thumb:< 28 bits cracked instantly · 28-35 minutes-to-hours · 36-59 fair · 60-127 strong · 128+ cryptographic-key strong.
When to use each mode
Random characters from a configurable charset. Use for: any account stored in a password manager, service account credentials, API tokens (if not provided by the platform), encryption keys you have to memorize 16+ chars.
Random words from the EFF-large list. Use for: master passwords (password manager, disk encryption, SSH key passphrase) — anything you need to actually remember and type by hand. 5-6 words is the sweet spot.
Digits only. Use for: device unlocks, SIM cards, ATM cards, anything constrained to a numeric keypad. 6 digits minimum; 4-digit PINs are basically unprotected (13 bits) against any attacker with access to the device.
2017+ NIST guidance (still current in 2026)
NIST's SP 800-63B is the modern reference. Highlights:
- Length over complexity. A long passphrase beats a short, complex password.
- Don't rotate on a schedule.Rotation only when there's evidence of compromise. Forced periodic rotation produces weaker passwords (people append a digit).
- No composition rules.Forcing “at least one uppercase, one symbol” barely helps and pushes users toward predictable patterns (
Password1!). - Block known-breached passwords using databases like haveibeenpwned.com.
- Allow paste. Sites that block paste actively prevent password-manager use.
- Multi-factor wherever possible, especially for email and password-manager accounts (the root accounts).
What this generator does well — and what it doesn't do
- ✓ Uses
crypto.getRandomValues(CSPRNG), notMath.random() - ✓ Rejection sampling — no modulo bias
- ✓ Deterministic character-class coverage, no infinite recursion
- ✓ EFF-large word list (7,776 words) for proper Diceware passphrases
- ✓ Real entropy calculation, not heuristic strength score
- ✓ zxcvbn-ts pattern detection for non-generated passwords
- ✓ Runs 100% in browser, no upload
- ✗ Store / sync your passwords (use a password manager)
- ✗ Check against breach databases (use haveibeenpwned.com)
- ✗ Generate cryptographic keys (use a CLI tool with proper key derivation)
- ✗ Hash passwords for server storage (use bcrypt / Argon2id server-side)
- ✗ Bulk-generate hundreds at a time — paste into a password manager and let it do it
References & further reading
- NIST SP 800-63B — Digital Identity Guidelines (Authentication and Lifecycle Management)
- EFF Long Wordlists — eff.org/dice — the 7,776-word list used here
- Diceware— Arnold Reinhold's original 1995 passphrase method
- zxcvbn— Dropbox's pattern-based password-strength estimator (this tool uses the maintained zxcvbn-ts port)
- haveibeenpwned.com— Troy Hunt's breach lookup service
- RFC 4086 — Randomness Requirements for Security (why CSPRNGs matter)
Frequently Asked Questions
CSPRNG vs Math.random, bits of entropy, EFF Diceware, zxcvbn scoring, modern NIST guidance.