.env · security🔥 popular🔒 100% client-side — never leaves your browser

ENV Leak Checker: find exposed secrets in a .env file

Check a .env file for leaked or exposed secrets: this ENV leak checker scans every value against 23 patterns for real credentials (AWS, Stripe, GitHub, OpenAI, Anthropic, Google, Slack, private keys and more), and can optionally check passwords against known data breaches without sending them anywhere.

By Aliniyaz Mamat · last reviewed

Be the first to rate

Quick-check a single value

Only a SHA-256 hash is sent — your value stays in your browser.

22 patterns
5 potential leaks detected
4
high
1
medium
AWS Access Keyline 1
AKIAXXXXXXXXXXXXXXXX
(hash only, never your value)
Stripe Live Secretline 2
sk_live_XXXXXXXXXXXXXXXXXXXXXXXX
(hash only, never your value)
GitHub Tokenline 3
ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
(hash only, never your value)
OpenAI API Keyline 4
sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXX
(hash only, never your value)
Generic Passwordline 5
PASSWORD=password123
(Have I Been Pwned · first 5 chars of a SHA-1 hash only)

Key takeaways

  • ✓Layer 1, always local: pattern matching in your browser. Nothing leaves the page.
  • ✓Layer 2, opt-in: passwords are checked with Have I Been Pwned's k-anonymity API, which only ever receives the first 5 characters of the SHA-1 hash. API keys are checked by their SHA-256 hash against our list of publicly leaked keys.
  • ✓Detects modern key formats: OpenAI sk-proj-…, Anthropic sk-ant-…, GitHub ghp_ and github_pat_, Stripe sk_live_ and rk_live_, Google AIza… and GOCSPX-…, npm, Hugging Face, Slack, SendGrid, Twilio and every -----BEGIN … PRIVATE KEY-----.
  • ✓Live keys (sk_live_) are HIGH, test keys (sk_test_) MEDIUM: test keys can't move money, but they still expose your account data.
  • ✓A match means "this is a real credential", not "this was leaked". Treat it as leaked if it was ever committed, shared or logged.

What it does

  • ▸Local pattern scan for 23 secret formats with severity
  • ▸Opt-in password breach check via HIBP k-anonymity
  • ▸Opt-in API key check against known public leaks (SHA-256 only)
  • ▸Quick check for a single key or password
  • ▸Plain-text values never leave the browser

Privacy

Runs 100% in your browser. Your .env never touches our servers.

client-side only

When to use this tool

  • →Before sharing a .env with a teammate, contractor or support ticket
  • →Auditing an old repository or backup for credentials that need rotating
  • →Checking whether a database password appears in known breach lists
  • →Teaching a team which strings count as secrets

Common mistakes

  • ⚠Assuming "not found in breaches" means safe: a key committed to a private repo yesterday won't be in any list yet
  • ⚠Deleting a leaked key from the latest commit only. It stays in git history; rotate it first
  • ⚠Rotating the key but not checking its usage logs for activity from unknown IPs
  • ⚠Scanning only .env: secrets also hide in docker-compose.yml, CI configs and notebooks

What the checker detects

ProviderPatternSeverity
AWSAKIA… access key IDs, 40-character secret keysHIGH
Stripesk_live_, rk_live_, whsec_ / sk_test_HIGH / MEDIUM
GitHubghp_, gho_, ghu_, ghs_, ghr_, github_pat_HIGH
OpenAI / Anthropicsk-proj-…, sk-… / sk-ant-…HIGH
GoogleAPI keys AIza…, OAuth client secrets GOCSPX-…HIGH
Slack, SendGrid, Mailgun, Twilioxox…, SG.…, key-…, SK…HIGH
npm, Hugging Facenpm_…, hf_…HIGH
Private keys-----BEGIN [RSA|EC|OPENSSH|…] PRIVATE KEY-----HIGH
JWTs, generic passwordseyJ….eyJ….…, password=…MEDIUM

Patterns catch credentials by their format, so they work offline and need no account. They can't judge whether a key is still active; only the provider's dashboard can.

How the breach check keeps your secrets private

  1. Passwords: your browser computes SHA-1(password) and sends only the first 5 hex characters to Have I Been Pwned (via our server, which adds padding). HIBP returns every breached hash with that prefix (hundreds); the comparison with the full hash happens in your browser.
  2. API keys and tokens: your browser sends SHA-256(key) to our server, which looks it up in a table of keys known to be public. A 256-bit hash of a random key can't be reversed, and the key itself is never transmitted.
  3. Both checks are off until you start them, and the pattern scan works without them.

You can watch the requests in your browser's DevTools (Network tab): the request bodies contain only a hash prefix or a SHA-256 digest.

A secret leaked: what to do, in order

  1. Revoke or rotate the key at the provider immediately. This is the only step that actually stops misuse.
  2. Check the provider's logs (AWS CloudTrail, Stripe events, GitHub security log) for use you don't recognise.
  3. Remove it from the code and from git history if needed (git filter-repo), then force-push and ask collaborators to re-clone.
  4. Prevent the next one: add .env* to .gitignore, a pre-commit secret scanner, and GitHub push protection.
# scan the whole git history locally with an open-source scanner
gitleaks git --verbose .

# or with trufflehog (verifies some keys against the provider)
trufflehog git file://. --only-verified

The guide how to hide .env from git covers removing committed secrets step by step. For sharing a .env safely in the future, encrypt it first with the ENV encrypt tool.

Frequently asked questions

Does this tool send my .env to a server?

No. The pattern scan runs only in your browser. The optional breach check sends a 5-character SHA-1 prefix (passwords) or a SHA-256 hash (API keys), never the value itself.

How is this different from gitleaks or trufflehog?

Those scan repositories and git history from the command line and belong in CI. This page is for a quick check of one file or one key without installing anything. Use both.

Can I check a single API key without pasting a full .env?

Yes. Use the quick check: choose API key / token or password and paste just the value.

Why is my Stripe test key MEDIUM and not HIGH?

sk_test_ keys can't charge real cards, but they can read and change your test-mode data and reveal your account. Rotate them if they leak, with less urgency than live keys.

The checker found nothing. Am I safe?

Not necessarily. Custom or internal secrets have no recognisable format, and a fresh leak won't be in breach lists. If a file was ever committed or shared in plain text, rotate what's in it.

Related tools

Learn more

coming soon

Get notified when env syncing launches

We're building a tiny tool to keep .env files in sync across teammates and environments. Leave your email — no spam, just a single launch ping.

We use your address only for this launch email. You can ask us to delete it at any time. Privacy policy