16 September 2026
Discover how Have I Been Pwned uses k-anonymity to check breached passwords without exposing yours. Learn how it works and how to use it safely.
If you've ever wondered whether your email address or password has turned up in a data breach, you've probably landed on Have I Been Pwned (HIBP) — the free breach-notification service built by Australian security researcher Troy Hunt. Since launching in 2013, the platform has indexed over 14 billion compromised accounts sourced from hundreds of data breaches, making it one of the most comprehensive breach databases available to the public.
But here's the question that stops a lot of security-conscious Australians in their tracks: if you're checking whether your password has been leaked, doesn't that mean you're sending your password to someone else's server? That's a completely fair concern — and it's exactly the problem that k-anonymity was designed to solve.
k-anonymity is a privacy concept originally developed in the context of data publishing, but HIBP applies a clever implementation of it to password checking. The core idea is simple: you should be able to verify whether your password appears in a breach database without the service ever learning what your actual password is.
Here's how it works in practice when you use HIBP's Pwned Passwords feature:
At no point does HIBP receive your full password or even your full hash. The server only ever sees a five-character prefix, which could correspond to hundreds of thousands of different passwords. That's the k-anonymity guarantee: your query is indistinguishable from many others, protecting your privacy even from the service you're querying.
SHA-1 is a cryptographic hash function that produces a fixed-length output regardless of input size. While SHA-1 is considered cryptographically broken for digital signatures and certificate purposes — meaning collisions can be engineered — it remains entirely appropriate for password hashing in this specific context.
The reason is straightforward: HIBP isn't using SHA-1 to protect your password from being reverse-engineered by a determined attacker with your hash. It's using it as a consistent fingerprinting mechanism so that both your local device and the HIBP database can refer to the same password in the same way, without transmitting the plaintext.
For users who want an extra layer of assurance, HIBP also supports NTLM hashes in its Pwned Passwords API, which is particularly useful for enterprise environments running Windows Active Directory. As of early 2026, the Pwned Passwords dataset contains over 10 billion unique hashed passwords sourced from real-world breaches.
Developers integrating HIBP into their own applications can use the Pwned Passwords API directly. The endpoint is straightforward:
GET https://api.pwnedpasswords.com/range/{first5HashChars}
A response looks something like this:
0018A45C4D1DEF81644B54AB7F969B88D65:1
00D4F6E8FA6EECAD2A3AA415EEC418D38EC:2
011053FD0102E94D6AE2F8B83D76FAF94F6:1
...
Each line contains a hash suffix followed by a colon and a count — the number of times that exact password has appeared in breach data. Your application concatenates the five-character prefix with each suffix, then checks whether the resulting 40-character hash matches the SHA-1 hash of the password you're checking.
This design means HIBP's servers are genuinely unable to log which specific password you checked. Even if their entire request log were subpoenaed or leaked, it would only reveal that someone queried a particular five-character prefix — information that's meaningless without knowing which of the hundreds of matching suffixes the user actually cared about.
The k-anonymity model pioneered by HIBP has been widely adopted across the security industry. Here are some notable implementations you might already be using without realising it:
You don't need to be a developer to benefit from HIBP. Here's how everyday Australians can use the service in 2026:
Head to haveibeenpwned.com and enter your email address. The site will tell you whether that address appears in any known data breach, which breach it came from, and what types of data were exposed — passwords, phone numbers, physical addresses, and so on. Your email address is sent to HIBP's servers for this check, but that's a deliberate trade-off: email addresses are identifiers, not secrets, and the service is explicitly designed to help you understand your exposure.
Visit haveibeenpwned.com/Passwords and type in a password. The k-anonymity model kicks in here: only the first five characters of the SHA-1 hash are transmitted. You'll see how many times that password has appeared in breaches. Even a count of 1 is a strong signal to change it immediately.
You can register your email address to receive automatic notifications whenever it appears in a newly processed breach. This is particularly valuable for Australians who may have had their data exposed in breaches they're not yet aware of — including the Optus breach of late 2022, the Medibank breach, and numerous smaller incidents that continue to surface in 2026.
k-anonymity is a robust privacy model, but it's worth understanding what it doesn't guarantee:
Under the Australian Privacy Act 1988 and the Notifiable Data Breaches scheme administered by the Office of the Australian Information Commissioner (OAIC), organisations holding personal information have legal obligations to protect that data and notify affected individuals of eligible data breaches. Integrating HIBP's API into employee onboarding and password reset workflows is a practical, low-cost measure that helps reduce credential-stuffing risk.
The Australian Cyber Security Centre (ACSC) has consistently recommended that organisations implement controls to prevent the use of known-compromised passwords. HIBP's k-anonymity API is one of the most straightforward ways to implement this recommendation without introducing new privacy risks.
For developers and IT administrators, implementing HIBP's Pwned Passwords API is genuinely straightforward. Libraries exist for virtually every major language:
pwnedpasswords package handles the hashing and API call in a single function.Troy Hunt also maintains a partnership with Cloudflare to serve the Pwned Passwords API at scale, meaning the service is highly available and performant even for production applications with significant query volumes.
Have I Been Pwned's implementation of k-anonymity is one of the most elegant solutions in modern applied security. It threads the needle between utility and privacy — giving you genuinely actionable breach intelligence without requiring you to hand over your most sensitive credentials to do it. Whether you're an individual Australian checking your personal accounts, a developer building a more secure application, or an IT manager trying to meet your obligations under Australian privacy law, HIBP's Pwned Passwords API is a tool worth understanding and using.
The next time someone asks whether it's safe to check your password on HIBP, you can explain exactly why it is — and why k-anonymity makes all the difference.