Strip API keys and secrets out of code before you paste it

Preset for source code and configuration: secret detectors on, prose detectors off. It recognises OpenAI, Anthropic, AWS, GitHub, Google, Stripe, Slack, Twilio, SendGrid, GitLab, npm and Hugging Face key formats, JWTs, PEM private key blocks, generic API_KEY=… and password: assignments, bearer tokens, internal IP addresses and MAC addresses.

Names and company names are switched off here on purpose: a stack trace full of [NAME_1] is unreadable, and variable names are usually the context that makes the model’s answer correct.

Replace with
network while you type: 0 requests

Your text

0 characters

Safe to paste

waiting for text
The cleaned version appears here as you type — highlighted so you can see exactly what changed.
CtrlEnter
no personal data yet Everything below happens in this browser tab. Nothing is uploaded, and nothing you type is saved.

    Preset: secrets, tokens, URLs and internal addresses — names and prose detectors off.

    What to look for — 30 detectors, custom terms, exceptions

    People & organisations

    Government & health IDs

    Financial

    Technical & secrets

    Location

    For the things no word list can know: internal codenames, unusual surnames, a product that isn’t public yet. Custom terms are never saved.
    Values on this list stay in the text and out of the mapping — useful when the model needs your own company name to answer usefully.
    Step 3 — paste the AI’s answer here to put the real values back

    The model replies using the placeholders. Paste its answer below and every [NAME_1] becomes the real name again — using the mapping held in this tab, which is the only copy that exists.

    How it works

    1. Open this page — the detectors are already set for “Remove API keys from code”.
    2. Paste your text, or drop a .txt, .md, .csv, .json or .log file onto the panel.
    3. Check the highlights: every match is coloured by type, and one click keeps a type as-is.
    4. Copy the safe version and paste it into the AI tool of your choice.
    5. Paste the model’s reply back into step 3 to restore the real values.

    Why a key in a chat window is worse than a key in a repo

    A committed secret is at least visible to your own tooling: secret scanners, pre-commit hooks and provider push-protection can find it, and you can rotate it. A secret pasted into a chatbot leaves your view entirely. It may sit in conversation history for years, it may be included in training data on a consumer plan, and there is no scanner that will tell you it happened.

    The practical rule most engineering teams land on is simple: any credential that reaches a chat window is a rotated credential. Scrubbing before the paste keeps that rule cheap enough to actually follow.

    What the detectors look for

    Provider keys are matched on their documented prefixes and lengths — sk-ant-, AKIA…, ghp_…, xoxb-…, AIza…, glpat-… — which keeps false positives low even in minified code. Generic assignments are matched by the key name rather than the value, so password: "correct horse battery staple" is caught while a base64 blob in the middle of a diff is left alone.

    JWTs are matched on their three-part structure. That matters more than it looks: the payload of a JWT is base64, not encrypted, so a token pasted into a chat often carries a user ID, an email address and an organisation ID in plain sight.

    Internal addresses (10.x, 192.168.x, IPv6) and MAC addresses are on because they map your network, and they are cheap to replace with a token the model can still reason about.

    Tips

    Detectors are pattern-based and imperfect: read the highlighted output before you paste it anywhere, and confirm your own confidentiality obligations against the current rules for your profession, employer or jurisdiction. Compiled 2026-07-29.

    Frequently asked questions

    Will it catch a key format you have never heard of?

    Only if it looks like an assignment (SOMETHING_KEY = value), a bearer token or a PEM block. Bare high-entropy strings with no context are deliberately not matched, because in code that pattern is also hashes, IDs, base64 images and test fixtures. Add unusual formats to custom terms.

    Does the tool phone home to check whether a key is live?

    No — that would mean sending your key to a third party, which is the exact failure this page exists to prevent. Validation here is purely structural: prefixes, lengths, checksums for card numbers and IBANs.

    Can I use this in a pre-commit hook?

    Not directly; this is a browser tool. For repositories, use a dedicated secret scanner in CI. This page is for the other path secrets take out of a company: a human pasting a snippet into a chat window.