Find out if your password has leaked, without sending it anywhere
Liverpool1 has turned up in data breaches 268,743 times, and attackers try leaked passwords first. Check yours in 10 seconds with a trick that never sends your password over the internet.
- Windows (PowerShell is built in), or a Mac or Linux PC (Terminal is built in)
- 10 minutes
Understand the trick that keeps it safe
Never type a real password into a random website. This method doesn't need you to.
Have I Been Pwned ↗ is a free service run by security researcher Troy Hunt. Its Pwned Passwords list holds passwords from real data breaches.
Your computer turns your password into a fingerprint (a SHA-1 hash, 40 letters and numbers). It sends only the first 5 characters of that fingerprint. The service replies with every leaked fingerprint that starts the same way, about 2,000 of them, and your computer checks the list itself. The service never learns which one was yours.
TipThis method is called k-anonymity, and it's documented in HIBP's own API docs ↗. No account or API key is needed.
Check a password
Run the check yourself, on your own machine.
Windowsopen PowerShell (Windows key, type
PowerShell, Enter). Copy this whole block, paste it in and press Enter:PowerShell$secure = Read-Host "Password to check" -AsSecureString $plain = [Runtime.InteropServices.Marshal]::PtrToStringBSTR([Runtime.InteropServices.Marshal]::SecureStringToBSTR($secure)) $bytes = [Text.Encoding]::UTF8.GetBytes($plain) $hash = -join ([Security.Cryptography.SHA1]::Create().ComputeHash($bytes) | ForEach-Object { $_.ToString("X2") }) $prefix = $hash.Substring(0,5); $suffix = $hash.Substring(5) $lines = (Invoke-RestMethod "https://api.pwnedpasswords.com/range/$prefix") -split "`r?`n" $match = $lines | Where-Object { $_.StartsWith($suffix) } Write-Host "Sent to the internet: $prefix (first 5 of 40 characters)" if ($match) { Write-Host ("LEAKED: seen {0:N0} times in data breaches." -f [int]($match -split ':')[1]) -ForegroundColor Red } else { Write-Host "Not found in any known breach." -ForegroundColor Green }Mac or Linuxopen Terminal, type
bashand press Enter (Macs use a different shell by default, and this script is written for bash), then paste this and press Enter:Terminal (bash)read -rs -p "Password to check: " pw; echo if command -v sha1sum >/dev/null; then h=$(printf '%s' "$pw" | sha1sum); else h=$(printf '%s' "$pw" | shasum -a 1); fi unset pw; h=$(echo "${h%% *}" | tr 'a-f' 'A-F'); p=${h:0:5}; s=${h:5} echo "Sent to the internet: $p (first 5 of 40 characters)" n=$(curl -s "https://api.pwnedpasswords.com/range/$p" | tr -d '\r' | grep "^$s:" | cut -d: -f2) if [ -n "$n" ]; then echo "LEAKED: seen $n times in data breaches."; else echo "Not found in any known breach."; fiIt asks for a password and hides what you type. Here's the real output for
password123, thenLiverpool1, thenglass-otter-violin-sunset-42, one run each:OutputSent to the internet: CBFDA (first 5 of 40 characters) LEAKED: seen 2,266,543 times in data breaches. Sent to the internet: 2DB7A (first 5 of 40 characters) LEAKED: seen 268,743 times in data breaches. Sent to the internet: E237B (first 5 of 40 characters) Not found in any known breach.
Checking Liverpool1 in PowerShell. The password shows as asterisks and only 2DB7A leaves the machine. Each check takes a fraction of a second. Notice what was sent: just 5 characters each time. A football team plus a number feels personal, but more than a quarter of a million people had the same idea. (The Mac and Linux version prints the count without commas, so
2266543. Same number.)TipAny count above zero means retire it. The number is how often that exact password appeared across breaches, not how safe it is. Even a password "seen once" is already on the wordlists attackers try first, so treat a count of 1 the same as a count of a million.
If it breaksIt says the script is "not digitally signed" or "cannot be loaded" + 2 more
It says the script is "not digitally signed" or "cannot be loaded"
Red error about the remote server
Mac: an error mentioning read or coprocess
bash, press Enter, and paste it again.Check your email address too
Find out which breaches your accounts were in, so you know what to change.
On haveibeenpwned.com ↗, type your email address. It lists every known breach your address appears in, and what leaked (passwords, phone numbers, addresses).
You can also sign up there for a free alert if your email turns up in a future breach.
Fix anything that turned up
A leaked password is only dangerous if you're still using it.
- Change it everywhere you used it. Attackers try leaked passwords on other sites automatically.
- Make every password unique. The easiest way is a password manager that creates and remembers them for you.
- Switch on two-step verification (a code from an app or text) for email, banking and social media. A leaked password alone then isn't enough.
- Start with your email account. Whoever controls your email can reset everything else.
glass-otter-violin-sunset-42 test, are easy to remember and very hard to guess. Just don't reuse ours.Never reuse a password again
Changing one leaked password fixes today. A password manager fixes it for good.
The real problem isn't one weak password, it's using the same one in ten places. The next lesson sets up KeePassXC: free, offline, and it creates a unique password for every site and remembers them all behind one master passphrase. You'll never have to think up a password again.
Your first wins
It works. Now do something with it.
Ask AI for a breach action plan
Paste your HIBP email results (the breach names, not your passwords) into Claude or ChatGPT:
My email appeared in these data breaches: [list the breach names and what leaked]. Give me a short, prioritised action plan: which accounts to secure first, what to change, and which scams I should watch for given what leaked. UK context.Make it a habit
Check again whenever you hear about a big breach, or set up the free HIBP email alert so you're told automatically.
Undo it cleanly
How to remove everything this mission installed.
Nothing was installed. Close the PowerShell window and the password you typed is gone from memory.