Password Generator
What this password generator does
This tool creates random passwords and passphrases with the Web Crypto API. Password mode picks characters from the classes you enable; Passphrase mode joins random words from a built-in English list. The strength label shows the estimated entropy in bits.
Store the result in a password manager so every site gets a different password.
How characters are chosen and how entropy is calculated
The pool combines uppercase A–Z (26), lowercase a–z (26), digits (10) and 24 symbols (!@#$%^&*()-_=+[]{};:,.?/), 86 characters in total. Exclude look-alike characters removes I, l, 1, O, 0 and lowercase o, leaving 80; use it for a password that will be read aloud or copied from paper.
Each character index comes from crypto.getRandomValues() with rejection sampling: a 32-bit value in the incomplete block at the top of the range is discarded and redrawn, so every character is exactly equally likely, with no modulo bias.
The generator picks one character from each enabled class, fills the remaining length from the full pool, then shuffles the positions with Fisher–Yates, so each enabled class appears at least once.
The meter computes length × log2(pool size) for passwords and words × log2(list size) for passphrases, plus log2(100) ≈ 6.64 bits for the number. Labels: under 28 bits Very weak, under 40 Weak, under 60 Fair, under 80 Strong, otherwise Very strong. The figure assumes an attacker knows your settings but not the random choices.
Worked example: entropy of a 16-character password
Defaults: 16 characters from 86. Entropy = 16 × log2(86) = 16 × 6.426 ≈ 102.8 bits (Very strong), or 86^16 ≈ 8.95 × 10^30 possible strings. With Exclude look-alike characters: 16 × log2(80) ≈ 101.2 bits. At 12 characters: 77.1 bits (Strong); at 8: 51.4 bits (Fair).
Requiring every class removes some strings: about 7.6 × 10^30 of them contain all four classes, or 102.6 bits. The meter ignores this small difference.
Passphrases: the list has 1,296 words, so each word adds log2(1296) ≈ 10.34 bits. The default six words give 62.0 bits (Strong); eight give 82.7 bits (Very strong).
Limitations to know
- The passphrase list is EFF's 1,296-word short list, so each word adds 10.34 bits, against 12.92 for a word from the 7,776-word long list. For 80+ bits use at least 8 words, or Password mode.
- The entropy figure applies only to unedited output from this generator.
- Symbols exclude ~ ` ' " < > \ | and space; add them by hand if a site requires one.
- If a site rejects a symbol or caps length, turn off Symbols or shorten and regenerate.
- Passwords are not saved. Copy the result before leaving the page.
Password questions
What length should I generate?
NIST SP 800-63B (revision 4) requires at least 15 characters when a password is the only factor, and at least 8 with multi-factor authentication. A generated 16-character password with all classes exceeds 100 bits.
Do I need symbols and numbers?
Not necessarily; NIST tells services not to impose composition rules. 16 lowercase letters and digits give 82.7 bits, all four classes give 102.8. Adding length raises entropy faster than adding classes.
Is a passphrase better than a password?
It is easier to type and remember, which suits a master password. It carries less entropy per character, so it must be longer.
Why not use Math.random()?
Math.random() is not designed for security and can be predictable. crypto.getRandomValues() uses the operating system's cryptographically secure generator.
Is it safe to use an online password generator?
It depends on how the page generates the password. This one draws every character from crypto.getRandomValues(), the browser's cryptographically secure generator, not from Math.random(). Save the password in a password manager rather than in a note or chat, and generate a different one for each account.
Related tools
Related articles
- How Long Should a Password Be? Entropy and Passphrases
How to generate strong passwords and passphrases under 2026 guidance: length over complexity, entropy math, EFF wordlists, and common mistakes that weaken them.
- UUID v4 vs v7 vs v1: Which Version to Use
When to use UUID v4, v7, or v1, and why v7 is the right default for new database tables. Bit layouts, practical recipes, and common pitfalls.