Passwords remain the primary authentication mechanism for most online services. Despite decades of advances in security technology, weak and reused passwords are still the leading cause of account compromise. In 2025 alone, credential-stuffing attacks accounted for over 60% of data breaches involving user accounts. Understanding password security isn't optional — it's a fundamental skill for both everyday users and developers building authentication systems.
Why Passwords Still Matter
You might hear that "passwords are dead" every year, but the reality is more nuanced. Passkeys and biometric authentication are gaining traction, but passwords remain the fallback for billions of accounts. Even if you use a passkey for your primary email, your bank, your doctor's portal, and countless other services still rely on passwords. Getting password security right protects you now and during the transition to passwordless authentication.
The consequences of poor password practices are severe: identity theft, financial loss, compromised business data, and the cascading failure that happens when one breached password unlocks dozens of other accounts.
What Makes a Password Strong?
A strong password resists guessing, brute-force attacks, and dictionary attacks. Three factors determine password strength:
- Length — The single most important factor. Each additional character exponentially increases the number of possible combinations.
- Character diversity — Using lowercase, uppercase, digits, and symbols increases the "alphabet size" an attacker must search.
- Randomness — Passwords based on words, patterns, or personal information are dramatically weaker than random ones.
Password Entropy Explained
Entropy measures the unpredictability of a password in bits. The formula is:
Entropy = log₂(C^L)
= L × log₂(C)
Where:
C = number of possible characters (alphabet size)
L = password lengthFor example:
- 8 characters, lowercase only (26 chars): 8 × 4.7 = ~37.6 bits
- 8 characters, mixed case + digits + symbols (~95 chars): 8 × 6.57 = ~52.6 bits
- 16 characters, mixed case + digits + symbols: 16 × 6.57 = ~105 bits
- 4 random common words (Diceware, ~7776 word list): 4 × 12.9 = ~51.7 bits
Current recommendations suggest a minimum of 60 bits of entropy for important accounts and 80+ bits for high-security contexts. A 16-character random password with mixed character types comfortably exceeds this. Use the Password Generator to create passwords that meet these thresholds.
Common Attack Methods
Brute Force Attacks
An attacker tries every possible combination until they find the right one. Modern GPUs can attempt billions of hashes per second against weak algorithms like MD5. Against a properly hashed password (bcrypt with cost factor 12), the rate drops to thousands per second — making long passwords effectively uncrackable.
Dictionary Attacks
Instead of trying every combination, attackers use lists of common passwords, English words, and known breached passwords. The most common passwords — "123456", "password", "qwerty" — are tried first. Variations like "P@ssw0rd" are also in these lists. If your password is based on a word with predictable substitutions, it's in the dictionary.
Credential Stuffing
When a service is breached, the leaked email/password pairs are tested against other services. If you reused a password, attackers gain access to multiple accounts from a single breach. This is why unique passwords for every account is non-negotiable.
Phishing
No amount of password strength helps if you type it into a fake login page. Phishing attacks trick users into submitting credentials to attacker-controlled sites. Defenses include checking URLs carefully, using a password manager (which won't autofill on the wrong domain), and enabling phishing-resistant 2FA like hardware keys.
Rainbow Table Attacks
Pre-computed tables of hash → password mappings. Defeated by salting (adding random data before hashing). Every modern hashing algorithm salts by default, but legacy systems may be vulnerable.
Creating Strong Passwords
Method 1: Random Character Passwords
Use the Password Generator to create truly random passwords. Set the length to at least 16 characters and enable all character types:
Examples of strong random passwords:
k9#Bx$mR2vLp&nQ7
Yw!8dF3*hJcT6@sE
4Nm&pZ#rK8!bVx2QThese are impossible to memorize — and that's fine. You should be storing them in a password manager.
Method 2: Passphrase (Diceware)
For passwords you need to type manually (like your password manager's master password), use a passphrase — multiple random words strung together:
Examples of strong passphrases:
correct-horse-battery-staple (classic, but use your own)
marble-quantum-frozen-bicycle
thunder-pixel-garden-crystal-mazeFive or more random words from a large word list provide excellent entropy while being much easier to type and remember than random characters.
What NOT to Do
- Don't use personal information (birthdays, pet names, addresses)
- Don't use single dictionary words, even with number substitutions
- Don't use keyboard patterns (qwerty, 123456, zxcvbn)
- Don't reuse passwords across services — ever
- Don't use the same base password with minor variations
- Don't share passwords via email, chat, or text messages
Password Managers: Your Essential Tool
A password manager generates, stores, and autofills unique passwords for every account. You only need to remember one strong master password. This is the single most impactful thing you can do for your security.
Recommended password managers:
- Bitwarden — Open source, free tier available, cross-platform. Excellent for individuals and teams. Supports self-hosting for maximum control.
- 1Password — Polished UX, excellent team features, developer-friendly with CLI and SSH agent integration.
- KeePassXC — Fully offline, open source, stores your vault as an encrypted file you control completely.
Tip: When setting up a password manager, audit your existing accounts first. Most managers have an import feature and a security audit that flags weak and reused passwords. Prioritize changing passwords for email, banking, and cloud storage accounts first.
Two-Factor Authentication (2FA/MFA)
Two-factor authentication adds a second verification step beyond your password. Even if your password is compromised, an attacker can't access your account without the second factor.
Types of 2FA (Ranked by Security)
- Hardware security keys (YubiKey, Google Titan) — Phishing-proof, the gold standard for security.
- Passkeys — Cryptographic credentials stored on your device, phishing-resistant by design.
- TOTP authenticator apps (Authy, Google Authenticator, Bitwarden Authenticator) — Time-based codes that change every 30 seconds.
- Push notifications (Duo, Microsoft Authenticator) — Convenient but susceptible to "MFA fatigue" attacks.
- SMS codes — Better than nothing, but vulnerable to SIM swapping. Avoid for high-value accounts.
Passkeys: The Future of Authentication
Passkeys replace passwords entirely with public-key cryptography. Your device holds a private key, and the service holds the public key. There's nothing to phish, nothing to leak in a breach, and nothing to remember. Apple, Google, and Microsoft all support passkeys natively. Enable them wherever available — they're more secure and more convenient than passwords.
For Developers: Storing Passwords Securely
If you build authentication systems, how you store passwords is critical. The golden rule: never store plaintext passwords. Use a slow, salted hashing algorithm purpose-built for passwords.
Recommended Algorithms
// Best choice: Argon2id (winner of the Password Hashing Competition)
// Memory-hard, resistant to GPU and ASIC attacks
import { hash, verify } from "@node-rs/argon2";
const hashed = await hash(password, {
memoryCost: 65536, // 64 MB
timeCost: 3,
parallelism: 4,
});
const isValid = await verify(hashed, password);// Excellent alternative: bcrypt (battle-tested, widely supported)
import bcrypt from "bcrypt";
const saltRounds = 12; // Adjust for your hardware — aim for ~250ms
const hashed = await bcrypt.hash(password, saltRounds);
const isValid = await bcrypt.compare(password, hashed);What NOT to Use for Password Hashing
- MD5 — Broken. Billions of hashes per second on a consumer GPU.
- SHA-1 / SHA-256 — Designed for speed, not password hashing. No built-in salt.
- Encryption (AES, etc.) — Reversible by design. You should never be able to recover the original password.
You can experiment with different hash algorithms using the Hash Generator to see how they work. Note that tools like this demonstrate the hashing concept — in production, always use purpose-built password hashing libraries.
Password Policies for Applications
If you set password requirements for users, follow current NIST guidelines (SP 800-63B):
- Minimum 8 characters, but encourage longer (12+).
- Maximum at least 64 characters — don't cap length unnecessarily.
- Allow all printable characters, including spaces and Unicode.
- Don't enforce composition rules (requiring uppercase + number + symbol). These lead to predictable patterns like "Password1!".
- Check against breached password lists (like HaveIBeenPwned's API). Reject passwords known to be compromised.
- Don't require periodic rotation unless there's evidence of compromise. Forced rotation leads to weaker passwords.
- Provide a password strength meter using a library like zxcvbn that estimates actual entropy rather than checking arbitrary rules.
Recovery and Backup
Strong security is useless if you get locked out. Plan for recovery:
- Store 2FA recovery codes in your password manager or printed in a secure location.
- Back up your password manager vault — encrypted exports stored in a separate location.
- Register multiple 2FA methods where possible (e.g., a hardware key AND a TOTP app).
- Document your master password securely for emergency access (sealed envelope in a safe, for example).
Security Checklist
Here's a practical checklist to audit your current password security:
- ☐ Use a password manager for all accounts
- ☐ Master password is a strong passphrase (5+ random words)
- ☐ Every account has a unique, randomly generated password
- ☐ Passwords are at least 16 characters for important accounts
- ☐ 2FA is enabled on email, banking, and cloud storage
- ☐ Recovery codes are stored securely
- ☐ No passwords are stored in plain text (notes, spreadsheets, sticky notes)
- ☐ Breached passwords have been changed (check HaveIBeenPwned)
Password security is an ongoing practice, not a one-time setup. Generate strong passwords with the Password Generator, store them in a password manager, enable 2FA everywhere, and adopt passkeys as they become available. These habits together make your accounts virtually immune to the most common attack vectors.