How password hashing works: bcrypt, Argon2, and why plain text storage is malpractice

When you create an account on a website, the site should hash your password before storing it. A hash is a one-way mathematical function: the same input always produces the same output, but you can't reverse the output to get the input. When you log in, the site hashes what you typed and compares it to the stored hash. If the database is breached, attackers see hashes, not passwords.

Security domain
Fundamentals
How passwords and hashing work
Topic focus
Password hashing
password-hashing

How this is calculated

Not all hashing is equal. A simple SHA-256 hash of a password is fast to compute, which means it's fast to brute-force. Modern password hashing algorithms (bcrypt, Argon2, PBKDF2) are deliberately slow and memory-intensive. bcrypt has a configurable cost factor that doubles the work with each increment. Argon2 (the winner of the 2015 Password Hashing Competition) adds memory hardness, making it expensive to attack with GPUs and ASICs. If a website emails you your password in plain text after signup, they are storing it without hashing, which is gross negligence. Close your account immediately. You can't fix their security, and if they're doing that wrong, everything else is probably wrong too.

Verdict

You can't control how websites store your password, which is exactly why you should never reuse them. A strong unique password per site, plus 2FA, means that even if a site stores passwords in plain text (and gets breached), only that one account is affected.

More Passwords scenarios

Frequently asked questions

How long should a secure password be?
16 characters or more, drawn from uppercase, lowercase, numbers, and symbols. A 16-character mixed password is currently impractical to brute-force with commodity hardware, while 8-character ones can be cracked in hours by modern GPUs.
Is the generated password actually random?
Yes. The generator uses the browser's crypto.getRandomValues(), a cryptographically secure random source backed by OS entropy. The output is suitable for production password managers, API keys, and seed phrases.
Is my password saved anywhere?
No. The entire generator runs in your browser, with no network requests, no logging, and nothing stored. Close the tab and the password is gone from memory. Check your browser's Network tab to verify there are no outbound calls when a new password is generated.
What's the difference between a passphrase and a password?
A passphrase is a string of dictionary words (like "correct-horse-battery-staple"), long but memorable. A password is usually shorter with mixed character classes (like "Kx9$mQ2!pR"). Passphrases are typically stronger per character of memory effort, and this tool generates both styles.
Should I use the same password everywhere?
Never. Use a password manager (Bitwarden, 1Password, Apple Passwords) and generate a unique strong password for every site. Password reuse is the single biggest cause of account takeover. One breached service leaks the credential, and every other account using it is automatically compromised.
How often should I change my passwords?
Modern guidance (NIST SP 800-63B) says don't rotate strong unique passwords on a schedule. Only change them if you suspect compromise. Forced rotation encourages weak, incremented passwords. Strong password + password manager + 2FA is safer than any rotation policy.