Get Started

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.

11 minBeginnerTools: FreeFree mission
Tested 7 Oct 2026 · Have I Been Pwned Pwned Passwords API, Windows PowerShell 5.1, Windows 11
A tiny script that checks any password against Have I Been Pwned's breach list
An understanding of why it's safeyour password never leaves your computer
A clear plan for any password that turns up
Before you start
  • Windows (PowerShell is built in), or a Mac or Linux PC (Terminal is built in)
  • 10 minutes
01/05Understand the trick that keeps it safe0 done
STEP 01 of 05~2 min

Understand the trick that keeps it safe

Never type a real password into a random website. This method doesn't need you to.

  1. Have I Been Pwned ↗ is a free service run by security researcher Troy Hunt. Its Pwned Passwords list holds passwords from real data breaches.

  2. 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.
✓
CheckpointYou can explain why the service never sees your password.
Stuck? Ask the community
STEP 02 of 05~4 min

Check a password

Run the check yourself, on your own machine.

  1. 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 }
  2. Mac or Linuxopen Terminal, type bash and 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."; fi
  3. It asks for a password and hides what you type. Here's the real output for password123, then Liverpool1, then glass-otter-violin-sunset-42, one run each:

    Output
    Sent 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.
    Windows PowerShell with the check script pasted in, the password hidden as asterisks, 2DB7A as the only thing sent, and a red line saying LEAKED: seen 268,743 times in data breaches
    Checking Liverpool1 in PowerShell. The password shows as asterisks and only 2DB7A leaves the machine.
  4. 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.
✓
CheckpointYou've checked at least one password and seen what was sent: 5 characters only.
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"
You saved it as a file. Windows blocks downloaded scripts by default. Paste the code straight into the PowerShell window instead, as above, and it runs fine.
Red error about the remote server
Check you're online. The service needs an internet connection to fetch the list for your 5 characters.
Mac: an error mentioning read or coprocess
You pasted it into zsh, the Mac default. Type bash, press Enter, and paste it again.
Still stuck? Ask the community
STEP 03 of 05~2 min

Check your email address too

Find out which breaches your accounts were in, so you know what to change.

  1. On haveibeenpwned.com ↗, type your email address. It lists every known breach your address appears in, and what leaked (passwords, phone numbers, addresses).

  2. You can also sign up there for a free alert if your email turns up in a future breach.

✓
CheckpointYou know which breaches, if any, your email appears in.
Stuck? Ask the community
STEP 04 of 05~2 min

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.
TipWhen you turn on two-step verification, an app code (Google Authenticator, Microsoft Authenticator, Aegis) beats a text message. Texts can be intercepted or redirected by someone who talks your phone network into moving your number, an attack app codes aren't exposed to.
TipLong passphrases of random words, like our glass-otter-violin-sunset-42 test, are easy to remember and very hard to guess. Just don't reuse ours.
✓
CheckpointEvery leaked password you found has been changed, starting with email.
Stuck? Ask the community
STEP 05 of 05~1 min

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.

✓
CheckpointYou've opened the KeePassXC lesson, ready to go.
Stuck? Ask the community

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:

Prompt
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.

Next mission · Go darkDelete your password manager subscription: a free vault that never touches the cloud
→