Password Generator
Generate strong, random passwords with customizable length and character types.
About Password Generator
What Is It?
A password generator creates cryptographically random strings you can use as passwords, API keys, or security tokens. Unlike passwords humans invent — which tend to follow predictable patterns like "Summer2024!" or "Password123" — a properly generated password is uniformly random, making it exponentially harder for attackers to guess through brute force or dictionary attacks. This tool uses the Web Crypto API's crypto.getRandomValues() under the hood, which taps into your operating system's entropy pool — the same source your browser uses for TLS encryption. That means the randomness isn't just "math.random() pretending"; it's actual cryptographic-grade entropy.
How Does It Work?
The tool selects characters uniformly from whichever character sets you've enabled — lowercase letters (26), uppercase letters (26), digits (10), and symbols (~30 depending on the set). The total pool size is the sum of enabled sets. For each position in the password, it picks one character at random using a modulo operation over the cryptographically random byte array. The security comes from entropy, measured in bits. A 16-character password drawn from a 72-character pool has roughly log2(72^16) ≈ 98 bits of entropy. Each additional character multiplies the search space by the pool size, so length matters far more than adding a single extra symbol class. Going from 8 to 16 characters with the same character set increases possible combinations by a factor of roughly 72^8 — that's about 722 trillion times harder to crack.
Common Use Cases
The obvious use is creating new account passwords, but there's more. Developers generate passwords for database connection strings, .env files, and CI/CD secret variables. System administrators use them for service account credentials and SSH keys. If you're setting up a WordPress site, you need a strong database password, admin password, and salts. You should also use generated passwords for Wi-Fi pre-shared keys, router admin panels, and any IoT device that ships with a weak default. For each distinct service, generate a unique password — never reuse passwords across sites, because a breach at one service instantly compromises all others where you used the same credential.
Tips and Best Practices
Length over complexity: A 20-character all-lowercase password has more entropy than a 10-character password with all symbol classes enabled. Aim for 16+ characters. Use a password manager: Bitwarden, 1Password, or KeePass can generate, store, and autofill passwords so you never need to memorize them. The only password you should memorize is your password manager's master password — make it a long passphrase (think 6+ random words). Avoid common mistakes: Don't use personal information (birthdays, pet names, street addresses). Don't use keyboard walks like "qwerty" or "1qaz2wsx". Don't add predictable suffixes like "!" or "1" to meet complexity requirements — attackers' dictionaries already account for these. If a site imposes a maximum password length below 20, that's a red flag — it may indicate they're storing passwords in plaintext or using weak hashing.
Frequently Asked Questions
How long should my password be? At minimum 12 characters, ideally 16-20. Beyond 20, you're well into overkill territory for most threat models. Do I really need symbols? Symbols add about 30 extra characters to the pool. On a 12-character password, that's worthwhile. On a 20-character password, the extra entropy from symbols is negligible compared to the length itself. Is it safe to generate passwords in a browser? Yes, this tool runs entirely client-side — your password never leaves your machine. The Web Crypto API provides genuine randomness, not pseudo-random number generation. How often should I change passwords? NIST's current guidance says: don't enforce periodic changes unless there's evidence of compromise. Generate one strong password per service and change it only if breached.