// free tool

Secret & Credential Detector

Paste code or config to find hardcoded API keys, tokens and private keys before you commit them. Runs entirely in your browser.

Runs entirely in your browser. Nothing you paste is uploaded, logged, or stored.

Scans as you type (briefly debounced on large pastes). Nothing you paste here leaves your browser — there is no server request, no analytics event and no logging of what you paste.

What this scanner checks and how

Paste code, a config file, a shell script, or a .env and this tool runs it through a set of pattern matchers built for the credential formats that actually get committed by accident — cloud API keys, private keys, database URLs, webhooks and bot tokens — plus two more general checks: assignments to suspicious variable names, and a high-entropy heuristic as a last resort. Every hit is reported with a line number, a redacted version of the value (first and last four characters only — never the full secret), and what to actually do about it.

Cloud and platform API keys

AWS access key IDs (AKIA/ASIA followed by 16 uppercase characters), GitHub tokens (ghp_, gho_, github_pat_ and friends), Stripe, Google, OpenAI and Anthropic keys all have a fixed, documented prefix and length — that specificity is what makes them safe to match directly, without needing surrounding context. An AWS secret access key is different: it is just a 40-character string with no distinguishing prefix, so it is only flagged when it sits next to a variable name that says what it is (aws_secret_access_key, AWS_SECRET_ACCESS_KEY), which is how it appears in essentially every real leak.

Private keys and database connection strings

A PEM block (-----BEGIN RSA PRIVATE KEY----- and its EC, OpenSSH, PGP and DSA cousins) is treated as critical the moment the header appears — there is no legitimate reason for key material to be sitting in a code file or a chat log. Database connection strings are checked for the specific shape scheme://user:password@host; a connection string with no embedded password (increasingly common with IAM-based auth) is not flagged, because there is nothing to leak.

Generic assignments and the high-entropy heuristic

Not every secret has a recognisable prefix. A variable literally named password, secret, token, api_key or auth holding a quoted string is flagged as high severity — unless that string is an obvious placeholder (empty, changeme, xxx, <your-key-here>, ${API_KEY}, process.env.X, and similar). Getting that exclusion list right is most of what separates a useful scanner from one that flags every .env.example in your repository. As a final catch-all, any variable assigned a long (33+ character) base64- or hex-looking literal is flagged at low severity and explicitly labelled possible — it is common for a hash, a cache key or test fixture data to look exactly like this from the outside.

// Instead of this:
const stripeKey = "sk_live_51H8xX2yZ0aBcDeFgHiJkLmNoPqRsTuVwXyZ";

// load it from the environment (and keep .env out of git):
const stripeKey = process.env.STRIPE_SECRET_KEY;
if (!stripeKey) throw new Error('STRIPE_SECRET_KEY is not set');

Deleting the line does not delete the leak

Git is a history of every version of every file, not just the current one. Committing a secret, then deleting it in a later commit, does not remove it — anyone with clone access can check out the earlier commit, look at the diff, or simply run git log -p and read it straight out of history. Force- pushing a rewritten history helps only if every existing clone, fork and CI cache is also purged, which in practice is close to never guaranteed. The credential has to be treated as burned the moment it was committed, not the moment someone notices.

Rotate first, then remove

Removing the line from source fixes the code; it does nothing about every place the old value is still valid — the provider’s systems have no idea you deleted a line from a file. Rotating the credential (issuing a new one and revoking the old one at the provider) is the step that actually closes the exposure, and it is the step people skip because it feels like the smaller, less urgent task compared to fixing the code. Do it in this order: rotate first, confirm the old credential is dead, then clean up the source and the history.

Why this runs entirely in your browser

A tool that asks you to paste API keys and then sends them to a server is asking you to trust that server with exactly the thing you are trying to protect — a strange position for a security tool to put you in, and unnecessary here. Every check this page runs is plain string and regular-expression matching, which JavaScript can do natively in your tab. There is nothing about detecting the shape of an AWS key or a private key header that requires a network round trip, so there isn’t one. You can verify this yourself: open your browser’s network tab, paste something in, and watch nothing happen.

The first ten minutes after you find a leaked production key

Rotate it first — issue a replacement credential and revoke the old one at the provider (IAM, the GitHub token settings page, the Stripe dashboard, wherever it lives) before doing anything else. Then check the provider’s access or audit logs for activity on that key since it was exposed — API calls, logins, or resource creation you don’t recognise. Update every place the old value was actually in use so nothing breaks silently once it’s revoked. Only after the credential is dead and replaced should you go back and clean up the source — remove the line, and if it was ever pushed to a shared or public repository, treat the git history as compromised too, not just the current file.

Frequently asked questions

What kinds of secrets does this scanner detect?

Cloud and platform credentials with a recognisable shape — AWS access keys, GitHub tokens, Stripe/Google/OpenAI/Anthropic API keys, Slack and Discord webhooks, Telegram bot tokens — plus PEM private key blocks, database connection strings with inline credentials, JWTs, and generic password/token/secret/api_key assignments. A last-resort heuristic also flags long, high-entropy strings assigned to a variable, labelled as "possible" rather than confirmed.

Is it safe to paste real production code or a real .env file here?

Yes. Everything runs client-side in JavaScript already loaded in your browser tab — there is no fetch() call anywhere in this tool, no analytics event fires on what you paste, and nothing is written to a server or a log. Open your browser’s network tab while you use it: pasting text here generates zero network requests.

Why does it flag some things as "possible" instead of just reporting them?

The high-entropy check looks for long, random-looking base64 or hex strings assigned to a variable — a shape that also matches hashes, session IDs, cache keys and test fixtures. It is a genuinely useful signal but not a confirmed match, so it is scored low and labelled "possible" rather than treated the same as a value that matched a specific credential format like an AWS key.

Why didn’t it flag my password= line?

The scanner deliberately skips obvious placeholders — empty values, "changeme", angle-bracket or template placeholders like <your-key> or ${API_KEY}, environment-variable references like process.env.X, and a handful of other common filler patterns — so the report stays useful instead of flagging every tutorial and .env.example file in your project. If a real value is still getting skipped, it may be too short (under 6 characters) to distinguish from filler.

It flagged something that isn’t actually a secret. Is that a bug?

It can happen — a long random-looking test fixture, hash, or non-secret ID can look identical to a real credential from the outside, and that is exactly what the high-entropy heuristic is built to catch broadly. That is why those findings are scored low and marked "possible," not critical. The pattern-based findings (AWS keys, GitHub tokens, private key headers, and similar) are far more precise because they match an exact, documented format.

Does this replace scanning my git history?

No — this tool only sees the text you paste into it right now. If a secret was ever committed, it is still sitting in your repository’s history even after you delete the line and commit again; git keeps every prior version by design. This tool is useful for checking a diff or a file before you commit it in the first place. Once something is already committed, the fix is rotation, not a follow-up commit.

Is this free, and do I need an account?

Yes to both — free, no account, no limit on how many times you use it. It is one of several free security tools Averto publishes; the same team also builds the full scanning platform linked below.

// one check is not a security programme

This checks one thing. Averto checks everything.

A secret scanner tells you about a single slice of your attack surface. Averto scans your websites, web apps, code, dependencies, containers, configuration and secrets in one place, then explains every finding in plain English.