Secret Detector
Scan code or text for leaked secrets, API keys, tokens, and sensitive patterns.
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
- Paste code, a config file, environment variables or any text. Click Load sample to see an example.
- Click Scan for Secrets.
- Read the summary of findings by severity, then the list sorted from critical to low.
- Rotate or remove any real secret it finds, then click Clear.
What it detects
| Pattern | What it looks for | Severity |
|---|---|---|
| AWS access key | AKIA + 16 capital letters or digits | Critical |
| GitHub token | ghp_, gho_ or ghr_ + 36 characters | Critical |
| Private key | -----BEGIN (RSA / EC / OPENSSH) PRIVATE KEY----- | Critical |
| Slack token | xoxb-, xoxa-, xoxp-, xoxr- or xoxs- | Critical |
| Stripe key | sk_ or pk_ + live_ or test_ + 24 or more characters | Critical |
| Google API key | AIza + 35 characters | Critical |
| AWS secret key | Any 40-character string of letters, digits, / and + | High |
| JWT token | eyJ… with three dot-separated parts | High |
| Password in code | password, passwd or pwd = "value" | High |
| Generic API key | api_key, apikey or api_secret = 20+ characters | Medium |
| Email address | name@domain.tld | Low |
| IPv4 address | Four numbers 0–255 separated by dots | Low |
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.
Related Security
Browse all tools from the same category.
TOTP / OTP Generator
Generate time-based one-time passwords
Open toolRandom Token Generator
UUID, API key, CSRF token, and hex strings in bulk
Open toolShowing 1-2 of 7