How it checks your password without sending it
This checker uses a technique called k-anonymity, the same one password managers and browsers use for breach alerts:
- Your browser turns the password into a SHA-1 hash. For
passwordthat's5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8. - It sends only the first 5 characters,
5BAA6, to the Pwned Passwords database. - The database replies with every leaked hash that starts with those 5 characters (often hundreds), plus random padding so the reply size reveals nothing.
- Your browser looks for the rest of your hash in that list. The database never learns which entry, if any, was yours.
How often common passwords appear in breaches
We checked a few well-known passwords with this tool. The numbers are how many times each one appears across leaked password lists:
| Password | Times seen in breaches |
|---|---|
123456 | 210,463,629 |
password | 52,373,976 |
P@ssw0rd | 6,421,554 |
correct horse battery staple | 391 |
Swapping letters for symbols doesn't help: P@ssw0rd has been seen millions of times. Even correct horse battery staple, the famous example of a strong passphrase, has leaked hundreds of times, because so many people copied it. A good password is random and unique to you.
What to do if your password was leaked
- Change it everywhere you used it, starting with your email account, which can reset all your other passwords.
- Use a different password for every site. Leaked passwords are tried on other sites automatically (credential stuffing), so reuse turns one breach into many.
- Let a password manager remember them, and create new ones with the password generator.
- Turn on two-factor authentication, so a leaked password alone isn't enough to sign in.
For developers: block breached passwords at sign-up
NIST's SP 800-63B guidelines require services to check new passwords against lists of compromised passwords. The same range API works from any backend, with no API key:
const hash = crypto.createHash('sha1').update(password).digest('hex').toUpperCase()
const res = await fetch('https://api.pwnedpasswords.com/range/' + hash.slice(0, 5), {
headers: { 'Add-Padding': 'true' },
})
const line = (await res.text()).split('\n').find(l => l.startsWith(hash.slice(5)))
const timesSeen = line ? Number(line.split(':')[1]) : 0Then store the password with a slow hash such as bcrypt, never SHA-1. Try the bcrypt generator, or read how many bcrypt rounds to use.