Secret scanner

Paste code, a config file, or an .env and see where API keys, tokens, and private keys are hardcoded — matched by known provider patterns and a keyword+entropy heuristic. Static check, runs entirely in your browser; nothing is uploaded.

Try:
Scan report

About this tool

This scanner reads a snippet of code, a config file, or an .env and points at the exact lines where an API key, token, or private key is hardcoded instead of loaded from the environment or a secrets manager. It is a static, pattern-based check (in the spirit of a secrets linter): it never runs your code, never contacts a provider, and nothing you paste leaves the browser.

It looks for three kinds of secret:

Matched values are redacted by default — only a short, non-secret prefix is shown — so you can share the report safely. Turn redaction off to see the full matched value.

Worked example

Input (default settings — redaction on):

aws_secret_key = "AKIAIOSFODNN7EXAMPLE"

Output:

1 finding(s) (1 high, 0 medium) in 1 line(s) scanned

line 1, col 19  HIGH  aws-access-key-id  AWS Access Key ID
  AKIA…[redacted]

Recommendation: remove hardcoded secrets from source, rotate anything real that was exposed, and load credentials from environment variables or a secrets manager. A clean result means nothing matched, not that the code is secret-free.

Switch Output format to JSON for a structured { summary, findings[] } object (each finding carries line, column, severity, rule, provider, and the redacted match) that you can feed into other tooling.

Limits and edge cases

FAQ

Which secrets does it detect?

Known provider keys by prefix shape (AWS AKIA…, GitHub ghp_…/github_pat_…, GitLab glpat-…, Slack xox… and webhooks, Stripe sk_live_…, Google AIza…, OpenAI sk-…, Twilio, SendGrid, npm, Shopify, Square), any PEM -----BEGIN … PRIVATE KEY----- header, JWT- shaped strings, and generic name = "value" assignments where the name is secret-ish (api_key, password, secret, token, …) and the value has high entropy. Provider patterns and private keys are high confidence; JWTs and generic assignments are medium.

Is a clean result a guarantee my code has no secrets?

No. This is a static pattern match, not a prover. It can miss a secret that is assembled at runtime, encoded, stored under an unusual name, or split across lines, and it doesn't know every provider's key format. Use it as a fast first pass, then back it up with a git-history scanner in CI and by rotating anything you're unsure about.

Does it check whether a detected key still works?

No — and that's deliberate. Some scanners make a live API call to the provider to confirm a credential is valid. This tool never sends anything to a provider (or anywhere): it runs entirely offline in your browser and only matches patterns. If it flags a real key, assume it is compromised, rotate it, and remove it from source.

Why was one high-entropy string flagged but a similar one wasn't?

The generic pass only fires when a secret-ish keyword (api_key, password, secret, token, …) is assigned the value, the value is at least 8 characters with high Shannon entropy, and it doesn't look like a placeholder. A random-looking string with no secret-ish name next to it, or one that reads like your_api_key_here/changeme/xxxx, is skipped on purpose to keep false positives down. Named provider prefixes are matched regardless of the surrounding name.

What does "redact" do, and why is it on by default?

With redaction on (the default), each finding shows only a short non-secret prefix followed by …[redacted], so you can paste the report into a ticket or chat without leaking the secret. Turn it off to reveal the full matched value when you need to confirm exactly what was found.

Does anything I paste get uploaded?

No. The scan runs as WebAssembly inside your browser tab; the text you paste is never sent to a server. You can disconnect from the network and it still works.

How do I fix a flagged secret?

Remove the hardcoded value from source and load it from an environment variable or a secrets manager at runtime (for example os.environ["API_KEY"] / process.env.API_KEY). If the secret was ever committed, rotate it — assume anything that reached a repository is compromised — and add a pre-commit or CI secret scan so it can't happen again.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool secret-scanner 'aws_secret_key = "AKIAIOSFODNN7EXAMPLE"'

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/secret-scanner/?text=aws_secret_key%20%3D%20%22AKIAIOSFODNN7EXAMPLE%22&min_severity=all&redact=true&format=text

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.