Security related services

Pwned Passwords API

by haveibeenpwned.com

Security related services Added on October 31st, 2026 Checked and working on November 16th, 2026
Visit haveibeenpwned.com →

What it does

Pwned Passwords from Have I Been Pwned lets you check whether a password appears in known data breaches, without ever sending the password. Hash the password with SHA-1, send only the first five characters of the hash, and compare the returned list of hash suffixes and counts locally (k-anonymity). Useful to warn users at sign-up who choose a breached password. Free, no key needed. An official MCP server at https://haveibeenpwned.com/mcp lets AI agents check password hashes against Pwned Passwords without signing in.
  • API
  • HTTP-GET
  • MCP
  • REST

At a glance

API key
Not needed · More APIs with no key
Pricing
Free, no key needed.
From the browser
Yes (CORS)
Interface
REST, HTTP-GET, MCP
Provider
haveibeenpwned.com
Last checked
Working on November 16th, 2026

More information: https://haveibeenpwned.com/API/v3#PwnedPasswords

Is this your service? Show that it is listed

Put this badge on your website or in your README; it links to this page. About the badge

Listed on Free Web Services

haveibeenpwned.com
Pwned Passwords API

Example request

curl

curl 'https://api.pwnedpasswords.com/range/21BD1'

JavaScript

const response = await fetch("https://api.pwnedpasswords.com/range/21BD1");
const text = await response.text();
console.log(text);

Python

import requests

response = requests.get(
    "https://api.pwnedpasswords.com/range/21BD1",
    timeout=30,
)
print(response.text)

The JavaScript works in a web page as well as in Node.js 18 or newer.

Did it work for you?

Tell us what you found when you tried Pwned Passwords API.