🕵️

Secret Detector

Scan code or text for leaked secrets, API keys, tokens, and sensitive patterns.

Scanning is performed entirely in your browser using regex pattern matching — no text is sent to any server. For production use, complement with dedicated secrets scanning tools such as git-secrets, truffleHog, or detect-secrets.
About this tool

Last updated:

Find leaked secrets before you share code

This secret detector scans pasted code or text for credentials that should not be public: cloud keys, access tokens, private keys and hard-coded passwords. Use it before you commit code, paste a config file into a ticket or share logs. Each finding shows its type, severity and line number.

How to use it

  1. Paste code, a config file, environment variables or any text. Click Load sample to see an example.
  2. Click Scan for Secrets.
  3. Read the summary of findings by severity, then the list sorted from critical to low.
  4. Rotate or remove any real secret it finds, then click Clear.

What it detects

PatternWhat it looks forSeverity
AWS access keyAKIA + 16 capital letters or digitsCritical
GitHub tokenghp_, gho_ or ghr_ + 36 charactersCritical
Private key-----BEGIN (RSA / EC / OPENSSH) PRIVATE KEY-----Critical
Slack tokenxoxb-, xoxa-, xoxp-, xoxr- or xoxs-Critical
Stripe keysk_ or pk_ + live_ or test_ + 24 or more charactersCritical
Google API keyAIza + 35 charactersCritical
AWS secret keyAny 40-character string of letters, digits, / and +High
JWT tokeneyJ… with three dot-separated partsHigh
Password in codepassword, passwd or pwd = "value"High
Generic API keyapi_key, apikey or api_secret = 20+ charactersMedium
Email addressname@domain.tldLow
IPv4 addressFour numbers 0–255 separated by dotsLow

How it works

The text is checked line by line with regular expressions in your browser. Nothing is sent to a server. Critical and high findings are partly hidden on screen, for example the first and last few characters with dots in between.

Limits to know

  • The AWS secret key rule matches any 40-character string of that kind, so Git commit hashes and other long IDs can be flagged too.
  • Secrets in formats not listed above will not be found.
  • It scans only the text you paste, not your Git history. Use a dedicated scanner such as git-secrets, truffleHog or detect-secrets in your pipeline.

Frequently asked questions

Is it safe to paste real secrets here?

The scan runs locally and nothing is uploaded. Still, treat any key that has been exposed as compromised and rotate it.

What should I do if a secret is found?

Revoke or rotate the key with the provider, remove it from the code and load it from an environment variable or a secrets manager instead.

More to explore

Related Security

Browse all tools from the same category.

Showing 1-2 of 7