Password hashing and salts
A well-run website never stores your password. It stores a hash of it, mixed with a random value called a salt. When you log in, it hashes what you typed the same way and compares the results.
A bouncer who keeps a fingerprint of each guest, not their house key. A stolen list of fingerprints does not open anyone's front door.
- You type a password
- 1Sent encrypted Your password travels to the site inside a secure connection. Uses: TLS Nobody on the network can read it.
- 2Salted The site mixes in a random value unique to your account. Uses: A random salt Stops attackers cracking everyone's passwords at once.
- 3Slow hash The result is run through a deliberately slow hash and only that is stored. Uses: Argon2, bcrypt or scrypt Makes guessing stolen passwords slow and costly.
- 4Your password A short or reused password can still be guessed or stolen elsewhere. Uses: Password manager, passkeys Use a unique password for every site, or a passkey.
- Signed in
Why it matters
When websites are hacked, properly hashed passwords are slow and expensive to recover. Badly stored ones are cracked within hours, which is why reusing passwords is risky.
Where you meet it
Every website login. Data breach notices often say whether passwords were 'hashed and salted'.
Go deeper history and technical detail
Salts stop attackers from cracking everyone's password at once with pre-computed tables. Password hashes should also be deliberately slow: bcrypt, scrypt and Argon2 (winner of the 2015 Password Hashing Competition) are designed for this. In 2012 LinkedIn lost millions of passwords hashed with unsalted SHA-1, and most were cracked.
Read or watch next
- Hashing Algorithms and Security - ComputerphileComputerphile (2013), video
Related terms
Cite this page Encryption Observer, “Password hashing and salts”, encryption.observer/terms/password-hashing/, checked December 2026.