About Password Generator
The strength of a random password is measured in entropy — the number of equally likely possibilities an attacker must search. Each character drawn uniformly from a 94-symbol printable set adds log2(94) ≈ 6.55 bits; from lowercase-only, 4.7 bits. A 16-character full-charset password is ~105 bits: beyond any realistic brute force, online or offline. This generator produces passwords with a cryptographically secure random number generator (the browser's crypto.getRandomValues), locally, with configurable length and character classes.
The CSPRNG detail is not pedantry. Math.random() is predictable — its state can be recovered from a handful of outputs, and passwords generated with it have been broken in the wild. Anything security-sensitive must come from an OS-level entropy source, which is exactly what Web Crypto provides.
How to use Password Generator
- Set any options (e.g. length, format) if available.
- Click Generate to create the output.
- Copy the result to use elsewhere.
Example
Input
Your input or data here
Output
Result will appear here after running the tool
Length beats complexity — the arithmetic
Compare two policies: 8 characters from all 94 symbols (~52 bits) versus 16 lowercase letters (~75 bits). The 'simpler' long password is ~8 million times harder to brute-force. Complexity rules that force Symbol+Digit+Upper into 8 characters mostly push humans into predictable patterns (Password1!), which cracking dictionaries model explicitly — mangling rules like capitalize-first, append-digit are the first thing tools like hashcat try.
Modern guidance (NIST SP 800-63B) reflects this: prefer length (allow at least 64 chars), drop mandatory composition rules, drop periodic forced rotation (rotate on evidence of compromise), and check candidate passwords against known-breached lists instead.
How fast do passwords actually fall?
Online attacks against a rate-limited login are slow (thousands of guesses/day) — nearly any random 10+ character password survives them. The real threat is offline cracking after a database leak: a single modern GPU tries ~10^10–10^11 MD5/SHA-1 hashes per second, and rigs scale linearly. At 10^12 guesses/second, a random 8-char full-charset password (94^8 ≈ 6×10^15) lasts under two hours on average; a random 14-char one (94^14 ≈ 4×10^27) outlasts the sun. The hash algorithm matters too — bcrypt/Argon2 slow attackers by factors of 10^4–10^6 — but you control your password's entropy, not the site's hashing.
Practical policy for real life
- Use a password manager and generate a unique random password per site — reuse, not weakness, is how one breach cascades into account takeover everywhere (credential stuffing).
- Default to 16–20 characters with all classes for stored-in-manager passwords; length costs you nothing when autofill types it.
- For passwords you must type on a TV or console, prefer longer letters+digits over shorter with awkward symbols.
- Exclude ambiguous characters (l/1/I, O/0) only when a human must transcribe the password; otherwise keep the full set.
- Turn on MFA where offered — it converts 'password leaked' from catastrophe into inconvenience.
Common errors and how to fix them
A site rejects the generated password
Cause: Legacy composition rules: maximum lengths (a red flag — often means plaintext or reversible storage), banned symbols, or required classes.
Fix: Regenerate with the site's constraints (adjust length/classes here). Note the max-length sites and treat them as higher-risk accounts.
"Random" passwords that later prove guessable
Cause: Generated with a non-cryptographic RNG (Math.random, time-seeded rand()) whose sequence attackers can reconstruct.
Fix: Only generate secrets from a CSPRNG. This tool uses crypto.getRandomValues; in your own code use crypto.randomBytes / secrets module.
Password truncated on entry
Cause: Some systems silently cut input at 16/20/72 bytes (bcrypt truncates at 72) — you set one password and a prefix of it works.
Fix: Stay within the effective limit (or pre-hash before bcrypt server-side). If a prefix logs you in, report it — that is a storage bug.
Modulo-biased generation in custom code
Cause: randomValue % charsetSize skews toward earlier characters when the RNG range is not a multiple of the charset size.
Fix: Use rejection sampling (discard out-of-range values). Reduced keyspace helps attackers more than it looks.
Tips and best practices
- Entropy quick math: bits ≈ length × log2(charset). Targets: 60+ bits acceptable, 80+ strong, 100+ overkill-but-free with a manager.
- Passphrases (5–6 random dictionary words, ~65–78 bits) are the right tool for the few secrets you must memorize — master password, disk encryption.
- Never reuse a generated password across sites; uniqueness is worth more than any amount of extra length.
- Check exposure of existing passwords via haveibeenpwned's k-anonymity API — it never sees the full password.
- Generated passwords here never leave your browser; there is no server call to generate or log them.
Frequently asked questions
- How long should my password be?
- 16+ characters (full character set) for anything stored in a password manager — that is ~105 bits, beyond brute force. For memorized secrets, a 5–6 word random passphrase. Below 12 random characters, offline cracking becomes a realistic risk after a leak.
- Are these passwords truly random?
- They come from crypto.getRandomValues — the browser's cryptographically secure RNG, seeded by the operating system's entropy pool. Unlike Math.random, its output cannot be reconstructed from observed values.
- Symbols or length — which matters more?
- Length, decisively. Each added character multiplies the search space by the charset size (~94×), while adding symbols to a fixed length only grows the per-character base. 16 lowercase beats 8 full-charset by ~23 bits (≈8 million×).
- Should I rotate passwords every 90 days?
- Not by calendar. NIST 800-63B dropped forced periodic rotation: it nudges users toward incremental, predictable variants. Rotate when there is evidence or suspicion of compromise, and always after a breach notification.
- Is it safe to generate passwords in a browser?
- This page generates locally with no network involvement — verify by devtools if you like. General caution stands for tools that generate server-side: a password that existed on someone else's server was never only yours.
- Why do some sites cap password length at 16 or 20?
- Usually legacy schema or misguided policy; occasionally a sign of plaintext storage. Properly hashed passwords have no meaningful length limit (bcrypt's 72-byte input cap aside). Treat low caps as a signal to enable MFA on that account.
Embed this tool
Add Password Generator to your own site, blog post, or internal docs — free, no signup. The widget runs entirely in your visitors' browsers, same as it does here.
Related tools
- JWT DecoderDecode header, payload, display claims, validate expiration
- JWT GeneratorCreate JWT with HS256 and custom payload
- Hash GeneratorMD5, SHA-1, SHA-256, SHA-512 hashes
- Password Strength CheckerEvaluate strength and security suggestions
- HMAC GeneratorGenerate HMAC (SHA-1/256/384/512) from key and message
- JWT Signature VerifierVerify HS256/384/512 JWT signature with shared secret