Secret & API Key Scanner

Paste a config file, a chunk of logs or a git diff - or load local files straight from disk - and this scanner hunts for the shapes that mean a credential has leaked: AWS key pairs, GitHub personal access tokens, OpenAI and Anthropic keys, Stripe live keys, Slack tokens, JWTs, PEM private key blocks, database connection strings with embedded passwords and a generic catch-all for anything else that looks like secret = "a-long-value". Every finding is graded by severity, shown with its line number and a masked value, and paired with the concrete rotation step for that provider.

100% private. This tool runs entirely in your browser. A secret scanner is one of the few tools where uploading the input would defeat the purpose, so nothing you paste or select is sent to a server - files are read with the browser's local file reader and the matching happens on this page only.

Scan your text or files

Paste anything that might carry credentials, or add local files (up to 5 MB each). Nothing leaves this page.

or
Ctrl+Enter also scans. Results stay on this page.

Detection pattern reference

Every pattern the scanner runs, what shape it matches and why it matters. Filter to narrow the table.

PatternSeverityLooks likeWhy it matters
AWS Access Key IDHighAKIAIOSFODNN7EXA.. (20 chars)Identifies an IAM user or role; the half of the pair that names the credential.
AWS Secret Access KeyCriticalaws_secret_access_key = "wJalrXUtnFEMI/K7MD.."Signs AWS requests. Anyone holding it acts as your IAM identity.
GitHub Personal Access TokenCriticalghp_ + 36 alphanumericClassic PAT with whatever scopes were ticked - often repo and admin.
GitHub Fine-Grained PATCriticalgithub_pat_ + 20+ charsRepo-scoped token; live until revoked or expired.
OpenAI API KeyCriticalsk-proj-AbCdEfGhIjKl.. (sk- also)Bills your account and reads organisation data.
Anthropic API KeyCriticalsk-ant-api- + 20+ charsClaude console key; admin variants manage the whole org.
Google API KeyHighAIza + 35 charsUnrestricted keys can burn your quota and billing account.
Google OAuth Client SecretHighGOCSPX- + 20+ charsWith the client ID it can impersonate your app in OAuth.
Slack Bot / User TokenHighxoxb-123..-AbCd..Grants the token's scopes inside your workspace.
Slack App-Level TokenHighxapp- + 10+ charsWorkspace-wide scopes - often more powerful than user tokens.
Slack Incoming Webhook URLMediumhttps://hooks.slack.com/services/T..Anyone with the URL can post into your channels.
Stripe Live Secret KeyCriticalsk_live_51HdAbCd.. (rk_live_ also)Can charge, refund and pay out real money. Same-day incident.
Stripe Test Secret KeyMediumsk_test_51HdAbCd..No real money, but probes your integration and test quota.
JWT (JSON Web Token)MediumeyJhbGci.. . eyJzdWIi.. . sigClaims are readable base64, not encrypted. Live tokens act as the user.
PEM Private Key BlockCritical-----BEGIN RSA PRIVATE KEY-----The block below is the key material - full access to what it unlocks.
PuTTY Private Key FileHighPuTTY-User-Key-File-2Header of a .ppk private key file.
Telegram Bot TokenHigh123456789:AA.. (33 chars)Operates your bot - reads its updates, sends as it.
Discord Bot TokenHighkey = M..timestamp.hmacFull control of the bot account.
npm Registry TokenHighnpm_ + 36 charsCan publish packages to your scopes - supply-chain risk.
PyPI API TokenCriticalpypi- + 40+ charsCan publish versions of your projects - package takeover vector.
Hugging Face TokenHighhf_ + 34 charsGated models, datasets and inference quota.
Vercel TokenMediumvercel_ + 20+ charsDeploys, env vars and project management.
DigitalOcean PATHighdop_ + 32+ charsDroplets, volumes and DNS for the account.
Azure Storage Account KeyCriticalAccountKey= + 88 base64 charsFull read/write on every container and blob.
Shopify TokenHighshpat_ / shpca_ + 20+ charsProducts, orders and customers in your store.
Square Access TokenHighsq0atp- + 20+ charsRefunds and transaction data.
Linear API KeyHighlin_api_ + 40+ charsFull CRUD on issues and projects.
Twilio Account SIDMediumAC + 32 hex charsLess sensitive alone; with a leaked auth token it is the full credential.
Database Connection StringCriticalpostgres://user:pass@host/dbDirect DB access bypassing the app layer.
Basic Auth in URLHighhttps://user:pass@host/Credentials in git remotes, webhook URLs and shell history.
Heroku API KeyMediumheroku_api_key = uuidFull control of every app in the account.
Mailchimp API KeyHigha1b2c3..-us7Sends campaigns and reads your subscriber list.
SendGrid API KeyHighSG.base64.base64Sends email as your domain - a phishing vector when leaked.
Generic Credential AssignmentLowapi_key / password / token = "16+ chars"Catch-all for providers without a known shape. Check by hand.

What this tool does

Credentials leak in boring ways: a .env file committed to a public repository, a database URL pasted into a support ticket, a private key block left in a CI log, an AWS key pair sitting in shell history on a laptop that later gets lost. Each of those incidents is just text with a recognisable shape, and this scanner is a set of 34 regular expressions tuned to exactly those shapes - the AKIA prefix of an AWS access key, the ghp_ prefix of a GitHub token, the three dot-separated base64 sections of a JWT, the -----BEGIN ... PRIVATE KEY----- banner of a PEM block. For each hit it grades the severity (a Stripe live key is an incident, a Twilio SID by itself is a warning), shows you where in the text it appeared, masks the value so your report can be shared safely, and tells you the exact console page where that credential has to be revoked. A generic catch-all pattern also flags anything that looks like password = "something-long" for providers without a known shape, so the scanner keeps finding things as new key formats appear.

How to use it

  1. Paste or load. Drop the suspect text into the box - a whole config file, a git diff of a commit you are about to push, or a log excerpt. For files on disk, use "Add local files" (multiple at once, up to 5 MB each); they are read locally by your browser and never uploaded. Not sure what it catches? Hit "Load sample" to see a demo config full of fake-but-recognisable secrets.
  2. Set the masking level. Partial (default) shows the first four and last four characters - enough to identify which credential it is without re-exposing it. Use full values only when you need to copy the exact key to revoke it, and hidden mode when the report will be read by people who should not see any of it.
  3. Tune the noise. The minimum-severity filter lets a first pass show only critical and high hits. The ignore list takes comma-separated substrings - add your team's placeholder conventions (for example sk-test- or changeme) so known-safe strings stop reappearing in every report. The scanner also detects obvious placeholders on its own and counts them separately instead of alarming you about them.
  4. Scan and triage. Findings are sorted critical-first, each with its file and line number, a masked value, the surrounding context line with the match highlighted, and an expandable note explaining what the credential is and the concrete rotation step. Click through every critical before you do anything else - those are the ones that move money or unlock accounts.
  5. Export the report. Copy a plain-text report for a ticket or chat, download it as .txt, or grab the structured .json if you want to pipe findings into your incident tooling. Reports honour whatever masking level is selected, so a shared report never carries more than you intended.

Worked example

Say you are about to push a commit that added a docker-compose.yml and a .env file. Open a terminal, run git diff HEAD~1 > review.txt, then paste the diff into this scanner (or select review.txt directly). The scan returns: one critical database connection string on line 47 (postgres://app:[email protected]/appdb), one critical Stripe live key in the env block, and one low-severity generic assignment for a POSTGRES_PASSWORD line. You fix the diff - replace every real value with an environment variable reference, add the file to .gitignore, re-scan until the findings list is empty except for placeholders - and only then push. Because the real values were already in your working tree, you still rotate the Stripe key and change the database password: a secret that touched disk unencrypted should be treated as compromised even if it never left the machine.

How it works

The engine is deliberately simple and inspectable: each of the 34 patterns is a regular expression with a severity, a human description and a remediation note. Scanning runs every pattern over the text, records each match with its byte offset, then converts offsets to file and line numbers using a precomputed line-start index so even multi-megabyte inputs stay fast. Matches that overlap each other are deduplicated by severity - if a specific rule (say, Stripe live key) and the generic catch-all both fire on the same span, only the specific one is reported, which keeps the list honest about what each credential actually is. Before anything is shown as a finding, the value is checked against a placeholder heuristic (words like example, runs of x, template syntax such as ${VAR}) and against your ignore list; values that look like templates are counted separately so they never inflate the alarm count. All of this is plain JavaScript in the page source - you can read every pattern yourself, and the whole scan works offline once the page has loaded.

Common mistakes

  • Scanning only the file, not the history. A secret removed in a later commit still lives in git history. Run this scanner over git log -p output or use git filter-repo to scrub it - and rotate the key regardless, because history is what forks and mirrors.
  • Trusting "it's only a test key". Test-mode keys (Stripe sk_test_, sandbox tokens) can still probe your integration, exhaust quotas, and in several providers are the same string that gets promoted to production. Treat every leaked credential as real until the provider says otherwise.
  • Deleting the file instead of rotating the key. Removing a secret from disk does nothing for the copies already in logs, backups, chat history or a public mirror. The credential itself must be revoked and reissued - deletion is cleanup, rotation is the fix.
  • Pasting the report with full values into a ticket. That re-leaks the secret to everyone who can read the tracker. Keep masking on partial or hidden for anything shared; switch to full only in the moment you copy a value to its revocation console.
  • Ignoring the low-severity catch-all. The generic pattern is the least certain, but it is the only one that catches providers without a known shape - and a leaked password assignment in a config file is exactly as dangerous as a named key. Give low findings a ten-second look each.
  • Scanning after the incident, not before the push. The cheapest time to catch a secret is in your pre-commit workflow, when rotation costs minutes instead of an incident response. This tool is one half of that; pair it with a git hook or CI check for the other.

Privacy

Everything on this page runs in your browser. Pasted text is held in a local variable, files are read with the browser's file reader and processed in memory, and the pattern matching is plain JavaScript executing on this page - no request ever carries your input to a server, nothing is stored, and there are no analytics calls attached to the scanner itself. You can verify it: open your network tab, run a scan, and watch that only this page's own assets load. The page also works fully offline once loaded, which is the strongest proof of all.

Related tools


Luke Keam
Spot a bug or want a custom utility built? I'd love to hear from you. Get in touch
Luke Keam | techgeek.biz