CLI Documentation
Breach searches and password checks from your terminal
Installation and first command
Install the .NET SDK (version 10 or later), then install the CLI preview from NuGet:
dotnet tool install --global HaveIBeenPwned.Cli --prerelease
hibp --version
The installer selects a native package for Windows, macOS or Linux on x64 or ARM64. Linux native builds need Ubuntu 24.04 or a compatible glibc. On older glibc systems with a supported .NET 11 runtime, install the managed package with dotnet tool install --global HaveIBeenPwned.Cli.any --prerelease.
Try a public lookup. This command retrieves the Adobe breach as a readable Markdown report and needs no API key.
hibp breach get Adobe --markdown
Run hibp --help to list command groups. Append --help to a group or command, such as hibp breach list --help, for its arguments and options. To update the preview, run dotnet tool update --global HaveIBeenPwned.Cli --prerelease using the same package name you installed.
API keys and subscription status
The breach catalogue, data classes and Pwned Passwords are public. For account, paste, domain and stealer log searches, use an HIBP API key with access to the feature. Enter the key at the hidden prompt, then check which credential the CLI will use.
hibp auth set
hibp auth status
Example output from hibp auth status after saving a key:
{"Action":"status","Configured":true,"Source":"credential-store"}
-
hibp auth set - Save a key in Windows Credential Manager, the macOS login Keychain or Linux Secret Service. On Linux, install
secret-tool(libsecret-toolson Debian or Ubuntu) and unlock your keyring in a user D-Bus session. To read one line from standard input, use--stdin. The optional positional<key>can appear in shell history and process listings. Use the prompt or standard input to keep it private. -
hibp auth status - Show the effective key source locally. In CI, set the
HIBP_API_KEYsecret environment variable. It takes precedence over a saved key. -
hibp subscription statusAvailable on: Core Pro High RPM - Check the key against the API and show the subscription's plan, expiry, limits and capabilities.
-
hibp auth remove - Delete the saved key. If
HIBP_API_KEYis set, the CLI continues to use it.
Plan-specific features
When a command requires a subscription, the badges beside its name show which plans include it. Commands without badges do not require a subscription.
Core Pro High RPM
Run hibp subscription status to see what your API key can access,
or compare plans on the pricing page.
Breaches and data classes
-
hibp breach list - List breach records. Use
--domain <domain>to filter by the breached website. Add--spam-list truefor spam lists only or--spam-list falseto exclude them. Omit the option to include both. -
hibp breach get <name> - Get one record by its unique
Namefrom the catalogue, for exampleAdobe. -
hibp breach latest - Get the breach most recently added to HIBP.
-
hibp dataclass list - List the types of data exposed in breaches, such as email addresses and passwords.
-
hibp dataclass descriptions - Get each data class with its description.
hibp breach list --domain adobe.com --spam-list false
Selected fields from the result:
[
{"Name":"Adobe","Title":"Adobe","Domain":"adobe.com","BreachDate":"2013-10-04"}
]
Account and paste searches
-
hibp account search <account>Available on: Core Pro High RPM - Look up an account, such as an email address, and return breach names. Add
--fullfor complete records,--domain <domain>to limit results to a breached website, or--include-unverified falseto exclude unverified breaches (defaulttrue). -
hibp account range <prefix>Available on: Pro High RPM - Search by the first six hexadecimal characters of an email address's SHA-1 hash. Trim whitespace and lowercase the address before hashing. The result contains all suffixes in that range and their breach names. Compare the remaining 34 characters locally to find the address. This requires a plan with k-anonymity email search.
-
hibp paste search <email>Available on: Core Pro High RPM - List pastes containing the address, including the paste source, ID and title when available.
Try a test account and filter the results to one website:
hibp account search multiple-breaches@hibp-integration-tests.com --domain adobe.com
Example output:
[{"Name":"Adobe"}]
An account or paste search with no matches returns [].
Domain monitoring and verification
Domain removal and meta tag verification were added after preview 2026.1118.1032.25-preview. On that version, use DNS or email to verify a domain and the domains dashboard to manage it.
-
hibp domain listAvailable on: Core Pro - List the domains on your subscription and their verification state.
-
hibp domain search <domain>Available on: Core Pro - Search a verified domain. JSON maps each affected email alias to its breach names. An empty result is
{}. -
hibp domain remove <domain>Available on: Pro - Remove monitoring and search access for this domain from your account (Pro). To restore access, add and verify the domain again. A successful removal returns
null.
hibp domain search example.com --markdown
Example Markdown output for a verified domain:
# Domain breach report: example.com
**2 breached accounts** across **2 distinct breaches**.
| Account alias | Breach count | Breaches |
| --- | --- | --- |
| alice | 2 | Adobe, Dropbox |
| bob | 1 | Adobe |
Verify a domain with Pro
Choose one method and replace example.com with the domain you control.
-
hibp domain verification dns-token example.comAvailable on: Pro - Publish the returned
txtRecordValueas a DNS TXT record at the domain root. -
hibp domain verification verify-dns example.comAvailable on: Pro - Verify ownership once the TXT record is visible in DNS.
-
hibp domain verification meta-tag example.comAvailable on: Pro - Place the returned
metaTagin the HTML<head>of the domain's HTTPS home page. -
hibp domain verification verify-meta-tag example.comAvailable on: Pro - Verify ownership once the meta tag is published.
-
hibp domain verification send-email example.com --alias adminAvailable on: Pro - Choose an approved mailbox name for the required
--aliasoption. Open the approval link sent to that mailbox to complete verification.
Stealer log searches
These searches require Pro and verified ownership of the domain being searched.
-
hibp stealerlogs email <email>Available on: Pro - List the websites where this email address appeared in stealer logs. The address must belong to your verified domain.
-
hibp stealerlogs website-domain <domain>Available on: Pro - List the email addresses captured when people signed in to your website.
-
hibp stealerlogs email-domain <domain>Available on: Pro - List email aliases on your domain and the websites associated with each alias.
hibp stealerlogs email-domain example.com
Example output:
{"alice":["example.net","example.org"]}
Password checks and hash ranges
-
hibp password check - Enter a password at the hidden prompt. The CLI hashes it locally, sends only the first five hexadecimal characters of its SHA-1 hash, and compares suffixes locally. The count tells you how many times that password appears in Pwned Passwords.
-
hibp password check --stdin - Read one password line from standard input. For multiple passwords use
--file <path>instead. -
hibp password check --file <path> - Check each line of a UTF-8 file, preserving spaces, blank lines, duplicates and input order. The report identifies passwords by line number. With
--parallelism <n>(short form-p), set the number of concurrent file lookups. The default is the logical processor count, with a minimum of two. Use1to check sequentially. -
hibp password range <prefix> - Return hash suffixes and occurrence counts for a five-character hexadecimal prefix, omitting padding entries. Use
--mode sha1(default) or--mode ntlm. A nonempty range alone does not identify a particular password.
A single check returns a result such as {"Found":true,"Count":42}. A file check returns one result per line:
hibp password check --file passwords.txt --fail-if-found
[
{"Line":1,"Found":true,"Count":42},
{"Line":2,"Found":false,"Count":0}
]
With these example results, the command finishes the report and exits with code 8.
Offline password downloads
hibp password download <output> downloads all 1,048,576 hash ranges. Allow substantial disk space and bandwidth. By default, the output is a directory with one PREFIX.txt file per range containing SUFFIX:COUNT lines. Run the same command again to refresh changed ranges using the saved index.
hibp password download sha1-ranges
hibp password download ntlm-ranges --mode ntlm
hibp password download pwnedpasswords --single --parallelism 64 --max-retries 5
--single,-s- Write ordered
HASH:COUNTlines to one file. The CLI appends.txtto the output name, so the last example writespwnedpasswords.txt. --mode sha1|ntlm,--ntlm,-n- Choose the hash algorithm. SHA-1 is the default. The NTLM flag overrides the mode. Use a separate directory for each algorithm.
--parallelism <n>,-p <n>- Set the number of concurrent range downloads. Values below two use eight times the processor count, with a minimum of two.
--max-retries <n>- Set retries per range. Omit for unlimited retries or use
0to disable retries. --overwrite,-o- Permit replacing a single-file export or range files in a nonempty directory without an index.
--force- Ignore saved directory ETags, fetch every range and rebuild the index. Replacing an existing single file requires
--overwrite.
Progress goes to standard error. The completion summary on standard output includes downloaded and unchanged range counts, elapsed time and throughput. Use --markdown to format the summary.
Output options and exit codes
--jsonor--markdown- All commands return JSON by default. Choose one format. API results preserve the response fields, and an empty success body becomes
null. Markdown produces a report for the command. Results go to standard output and prompts, errors and progress go to standard error. --outfile <path>and--force- Write a data command's result to a file in an existing directory. Add
--forceto replace an existing file. Choose the format explicitly for Markdown, regardless of the extension. Auth commands write to standard output, and password downloads take their own output argument. --fail-if-found- Return exit code
8when an account search or range, domain search, paste search, stealer log search, password check or password range has findings. For range queries this means any result in the requested range. Without the flag, findings return0.
hibp domain search example.com --markdown --outfile report.md
| Exit code | Meaning |
|---|---|
| 0 | Success, including an empty search |
| 1 | Unexpected failure |
| 2 | Invalid arguments or rejected request |
| 3 | Missing or rejected API key |
| 4 | Permission or subscription restriction |
| 5 | Rate limit exhausted |
| 6 | Network, timeout or service failure |
| 7 | File or credential-store failure |
| 8 | Findings with --fail-if-found |
| 9 | Resource missing or domain verification unsuccessful |
| 130 | Cancelled |