Code Secret Scanner
Check code, logs and .env files for leaked secrets before you paste them into a ticket, a forum or an AI chat, and get a redacted copy.
Runs in your browser. Your files never leave your device. See how to check
…
How to do it
- 1Choose the input
Paste code, logs or a .env file, or switch to Files or a folder and pick them.
- 2Read the results
Check the High, Medium and Low counts and filter the list by severity.
- 3Look at each finding
See the file, line, masked value and advice; tick Show full values only on a private screen.
- 4Dismiss false alarms
Press Not a secret, ignore, or add fragments to the ignore list and turn off rules you do not need.
- 5Share safely
Copy or download the redacted text, or download redacted files as a ZIP.
- 6Keep a report
Download the CSV or SARIF report, then rotate any real secrets that were found.
About this tool
Secrets leak in ordinary moments: a config file attached to a support ticket, a stack trace pasted into a forum, a project folder zipped for a freelancer, or a snippet shared with an AI assistant. Once an API key is out, anyone who finds it can run up a bill or read your data. This scanner checks text before it leaves your hands. Paste code, logs or a .env file, or pick files or a whole project folder, and it looks for more than 25 kinds of secret: AWS access keys, GitHub, GitLab, Slack, Stripe, Google, OpenAI, Anthropic, Hugging Face, SendGrid, Twilio, npm and PyPI tokens, Slack and Discord webhooks, private key blocks, JSON Web Tokens, database URLs with a password inside, Azure storage keys and variables named password, secret or api_key that hold a literal value. An optional entropy check also flags random-looking strings that match no known format. Each finding shows the file, line and column, a masked value and what to do about it. You can copy a redacted version of the text, download redacted files as a ZIP, and save a CSV or SARIF report.
Fewer false alarms
Placeholders such as changeme, your_api_key, $API_TOKEN or process.env.SECRET are skipped, because they are references, not values. Add fragments to the ignore list (for example EXAMPLE or test_key_), switch off a rule that does not fit your code, or mark a line with secret-scan:ignore, gitleaks:allow or pragma: allowlist secret, which other scanners also understand.
The entropy check
Real keys look random: many different characters with no pattern. Entropy measures that in bits per character. Quoted strings of 24 characters or more above the threshold (4.2 by default) are reported as low severity. Hashes, UUIDs and test fixtures also look random, so treat these as prompts to look, not as proof.
What to do with a real finding
Revoke or rotate the secret in the provider's dashboard first. Deleting it from the file is not enough if it was committed, pushed, pasted or deployed: git history, forks, caches and chat logs keep copies. Then move the value to an environment variable or a secret manager and add the file to .gitignore.
Limits
Pattern matching cannot recognise every in-house token format, secrets split across lines or built from pieces, or values encoded in Base64. A clean result lowers the risk but is not a guarantee. The scanner reads only what you give it; it does not search the internet, test whether a key works, or touch anyone else's systems. Files are read in the browser and nothing is uploaded; the ignore list is saved on this device, so add only fragments, never a full key.
Worked example
A developer pasted a 140-line config.js before sharing it in a public bug report. The scanner found 4 problems: a Postgres URL with the password Winter2026! on line 3 (high), an AWS access key on line 9 (high), a Stripe live secret key on line 12 (high) and apiPassword = hunter2-but-longer on line 30 (medium). A $API_TOKEN placeholder on line 31 was correctly skipped. He copied the redacted text, in which each value became [REDACTED:rule], posted that instead, and rotated the AWS and Stripe keys the same day.
Quick facts
- Category: Security & Privacy
- Works in your browser, no sign-up, no upload.
- Your input stays on your device.
- Available in English.
- Content last reviewed:
- Official source: OWASP Secrets Management Cheat Sheet
Frequently asked questions
Is my code uploaded to be scanned?
No. Pasted text and files are read and scanned by JavaScript in your browser. Nothing is sent to a server, so it is safe to use on private repositories and production config.
Which secrets can it find?
Cloud and payment keys (AWS, Google, Azure, Stripe), developer platform tokens (GitHub, GitLab, npm, PyPI, Hugging Face), AI API keys (OpenAI, Anthropic), messaging tokens and webhooks (Slack, Discord, Telegram, SendGrid, Twilio, Mailgun), private key blocks, JWTs, passwords inside URLs and hard-coded password variables.
Can I scan a whole project folder?
Yes, in a desktop browser. Pick the folder and every text file is scanned; node_modules, .git, build folders, images, archives and files over 5 MB are skipped. On phones, pick individual files instead.
What is SARIF?
SARIF is the standard report format for static analysis tools. VS Code with the SARIF Viewer extension and GitHub code scanning can open it, so findings appear on the right lines. Values in the report are masked.
Does a clean scan mean my code has no secrets?
No. It means none of the known patterns matched. Custom token formats, secrets split into pieces and encoded values can still slip through, so keep secrets out of code by design and use a secret manager.
I found a real key. Is deleting it enough?
No. If it was ever committed, pushed or shared, treat it as public: revoke or rotate it with the provider first, then remove it from the code and, if needed, from git history with git filter-repo.
