DevTools Logo

Password Breach Checker

Password Breach Checker

Check if your password has appeared in known data breaches.

🔒 Your password never leaves your browser. Only the first 5 characters of its SHA-1 hash are sent to the HIBP API (k-anonymity model).

Powered by Have I Been Pwned

Examples

Build a k-anonymity range lookup

Input
Password: password
Output
SHA-1: 5BAA61E4C9B93F3F0682250B6CF8331B7EE68FD8
Range prefix sent: 5BAA6
Suffix retained locally: 1E4C9B93F3F0682250B6CF8331B7EE68FD8

The component sends only the first five hash characters and retains the rest for a client-side suffix comparison.

Match a suffix in a range response

Input
Requested suffix: 1E4C9B93F3F0682250B6CF8331B7EE68FD8
Response:
1E4C9B93F3F0682250B6CF8331B7EE68FD8:3303003
ABCDEF1234567890ABCDEF1234567890AB:1
Output
Breach count: 3303003
State: breached

parseHibpResponse returns the integer after the matching suffix, so any positive count selects the breached state.

About this tool

Password Breach Checker uses the browser's Web Crypto API to calculate an uppercase SHA-1 digest of the entered password. It splits the 40-character digest into a five-character prefix and a 35-character suffix; the password and complete digest are not included in the range request.

The component requests /api/hibp/<prefix> and compares the locally retained suffix with each SUFFIX:COUNT line in the returned range. A matching line produces the breach count, no match produces the not-found state, and a failed request produces an explicit connection error. This is the k-anonymity range pattern rather than a full-password lookup.

SHA-1 here is only a compatibility lookup key for the breach corpus, not a password-storage recommendation. A not-found result means the value was absent from the returned known-breach range at check time; it does not establish that the password is strong, unique, or safe to reuse.

How to use

  1. Enter the password locally

    Type the password into the masked field. Use the visibility control only when shoulder-surfing is not a concern, and press Enter or click Check Password.

  2. Understand the range request

    The browser hashes the value with SHA-1 and sends only the first five hexadecimal characters to the application's HIBP range endpoint; the remaining suffix stays in the browser for matching.

  3. Interpret the result

    A red result reports the matching breach count, a green result says the suffix was not found in the returned data, and a yellow result means the range request failed.

  4. Act on a match

    Replace a breached password everywhere it was used, choose a unique value for each account, and store credentials in a reputable password manager.

Use cases

Checking a password before adoption

Look for known exposure before choosing a password, while still evaluating length, uniqueness, and randomness separately.

Responding to an account incident

Check a suspected credential and use a positive result as a prompt to rotate it anywhere it was reused.

Demonstrating k-anonymity

Show how a five-character hash prefix can request a candidate range without transmitting the complete password hash.

Validating an integration response

Use known suffix/count lines to confirm that a range proxy and client parser preserve counts and line endings correctly.

Common mistakes

Mistake:Assuming the password or full SHA-1 hash is sent to the breach service.

Fix:The component sends only the first five hash characters to the range endpoint and compares the returned candidates with the remaining suffix locally.

Mistake:Treating Not found in known breaches as a guarantee that the password is strong.

Fix:Use a long, randomly generated, unique password anyway. Absence from a known corpus says nothing about guessing resistance or reuse elsewhere.

Mistake:Using SHA-1 to store application passwords because this checker calculates it.

Fix:SHA-1 is used only to address the breach range. Store passwords with a dedicated adaptive password-hashing scheme and an appropriate work factor.

Mistake:Interpreting a network error as a clean result.

Fix:Retry after connectivity or API availability is restored. The component has a separate error state and does not classify a failed request as safe.

Frequently asked questions

References & standards