Secret and API key redactor

Paste a log, a .env file or a code snippet before you post it somewhere public. Matches for 14 well-known secret shapes — AWS keys, GitHub tokens, Stripe keys, Slack tokens and more — are blanked out in the output below. Nothing you paste is sent anywhere; matching runs in your browser only.

Paste text to scan
Findings nothing scanned yet

Paste something above. Nothing here looked like one of the 14 known secret shapes yet.

Redacted output

About this tool

Pasting a log into a GitHub issue, a Slack thread or a support ticket is one of the most common ways a real secret ends up somewhere it shouldn't. This scans pasted text against 14 recognisable secret shapes — vendor-specific prefixes like AKIA, ghp_, sk_live_ and xoxb-, plus a generic PEM private-key block — and replaces each match with a labelled placeholder before you copy the result out.

How it works

Each secret type is matched by its own regular expression, run entirely client-side. Where a vendor gives a token an identifiable prefix — AWS's AKIA/ASIA, GitHub's ghp_ and github_pat_, Stripe's sk_/rk_, Slack's xox*- and xapp-, npm's npm_, PyPI's pypi-, SendGrid's SG., Twilio's AC account SID, Shopify's shpat_/shpca_/shpss_, and Google's AIza — that prefix plus the documented length is what's matched. A PEM -----BEGIN PRIVATE KEY----- block and a JWT's three dot-separated segments are matched by shape alone. Overlapping matches are resolved by keeping the earliest, longest one, so a single string is never double-counted.

Common questions

Why wasn't my secret caught?

Only the 14 shapes listed under Known limitations below are matched. A secret with no recognisable vendor prefix — a bare API key, a database password, a random internal token — looks like ordinary text to a prefix-based scanner and will not be redacted. Read the pasted text yourself before posting it; this tool catches the common, recognisable cases, not everything.

Why is my Stripe publishable key still showing?

Stripe's own documentation states that publishable keys (pk_test_/pk_live_) are designed to be used in client-side code and are safe to expose — only secret keys (sk_) and restricted keys (rk_) are matched here.

Is a JWT actually a secret?

Not always — a JWT is a signed, not encrypted, token, and plenty are designed to be readable. It's flagged anyway because a JWT often carries session or identity data worth keeping out of a public paste, but check what it decodes to before deciding whether it needs redacting. This site's own JWT decoder reads one without sending it anywhere.

Known limitations

The same job at the command line

More tools

See the whole toolbox — thirty-seven free tools planned, all running in your browser.