Have I Been Pwned — k-Anonymity Breach Checker

Check if your password appeared in a data breach using only a hash prefix

Ad placeholder (leaderboard)

The Have I Been Pwned Pwned Passwords service lets you check whether a password has ever appeared in a known data breach. The clever part is how it does this without seeing your password: through a technique called k-anonymity. This tool implements that protocol faithfully, so you can check real credentials with confidence that nothing sensitive is exposed.

How it works

The k-anonymity flow has four steps, the first and last of which happen entirely in your browser:

  1. Your password is hashed with SHA-1 locally using the Web Crypto SubtleCrypto API, producing a 40-character hex hash.
  2. Only the first 5 characters (the prefix) are sent to https://api.pwnedpasswords.com/range/{prefix}.
  3. The API returns every breached hash suffix sharing that prefix — typically several hundred — each with the number of times it has been seen in breaches.
  4. Your browser searches that list for the remaining 35 characters of your hash. If it is there, the count tells you how exposed the password is.

Because the server only ever sees a 5-character prefix shared by many thousands of passwords, it cannot tell which one you were checking — and the response is padded so its size leaks nothing either.

Tips and notes

  • A high count is a red flag: a password seen millions of times is in every attacker’s first guess list. Stop using it immediately.
  • A count of zero is reassuring but not a strength rating. Pair this with the entropy meter to confirm the password is also hard to guess.
  • If the check fails to connect, it is almost always a transient network issue — retry. Your password is never stored, so there is no risk in re-running it.
  • This relies on the live HIBP range service. It is a free public API and needs no key, but it does require a network connection (the hashing and matching are local; only the prefix lookup goes out).
Ad placeholder (rectangle)