Redact API Keys & Secrets

Paste a log, .env or config: API keys, tokens, JWTs and passwords become placeholders like [OPENAI_KEY_1]. Paste the AI reply back to restore them. No upload.

  • Runs in your browser
  • Tool input is not uploaded to ZeroTool servers
  • Free · No Sign-Up
Detect
All six categories start enabled. Open Detect to change them; each change immediately rebuilds the mapping. With every category off, the output is the original text. High-entropy detection requires 32+ base64 characters, mixed upper/lower case and digits, and at least 4.2 bits of Shannon entropy per character.
Load a sample .env and log with dummy credentials. The same value uses the same placeholder wherever it appears. Loading the example replaces the original text and rebuilds its mapping.
Clear removes both inputs, both results and the in-memory mapping. Ctrl/Cmd+L does the same while focus is in the tool. Detector selections stay unchanged.

Paste text to scan.

Paste logs, .env files, config or code. Detection runs 0.25 seconds after typing stops. The limit is 1,000,000 characters; split larger text.
② Redacted text Copy the full redacted text into your AI prompt. Ask the assistant to preserve bracketed placeholders such as [OPENAI_KEY_1] exactly, so the reply can be restored.
 
Expand Findings to see each distinct placeholder, the matching rule, a masked value preview and its occurrence count. A repeated value shares one placeholder.

Detection can miss secrets. Review the redacted text before sharing it.

Keep the original text in ① and the detector settings unchanged until you restore the reply. The mapping is rebuilt from the current text and settings.

Paste the AI reply. Restoration runs 0.15 seconds after typing stops, using the current mapping. Case changes, spaces inside brackets and Markdown-escaped brackets are accepted; names without brackets remain unchanged.
Restored reply Copy the full restored reply into your terminal or editor. Unmatched placeholders stay unchanged; unknown uppercase placeholders are listed below. If copying fails, select the text and copy it manually.
 

The restored reply contains the original secret values. Check where you paste it.

Read the full guide Redact Secrets Before You Paste Logs into an AI Chat or an Issue
Examples, details and FAQ Worked examples, how it compares with other tools, and answers to common questions.

Example: a failing CI job log

A deploy step ran curl -v, so the log shows the request headers, and a debug line printed two AWS variables. The AWS values are the example keys from the AWS IAM documentation.

Run curl -sv https://api.example.com/v1/deploy
> POST /v1/deploy HTTP/2
> Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
< HTTP/2 403
env AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
env AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
env GIT_SHA=3f786850e387550fdab836ed7e6dc881de23001b
Error: Process completed with exit code 22.

Box ② shows this, with 3 findings:

Run curl -sv https://api.example.com/v1/deploy
> POST /v1/deploy HTTP/2
> Authorization: Bearer [JWT_1]
< HTTP/2 403
env AWS_ACCESS_KEY_ID=[AWS_ACCESS_KEY_1]
env AWS_SECRET_ACCESS_KEY=[AWS_SECRET_KEY_1]
env GIT_SHA=3f786850e387550fdab836ed7e6dc881de23001b
Error: Process completed with exit code 22.

The header name and the Bearer scheme stay, so the assistant can still see that an authenticated request got a 403. The commit SHA stays because it is hex only. If you want to know whether that token had already expired, decode it in the JWT Decoder first; it also runs locally.

Example: one password in two places, then restore

services:
  db:
    image: postgres:16
    environment:
      POSTGRES_PASSWORD: hunter2-staging
  api:
    environment:
      DATABASE_URL: postgres://app:hunter2-staging@db:5432/app
      MAX_TOKENS: 1024

Both copies of the password become [SECRET_1], although two different rules found them. That tells the assistant the two values match without showing either. MAX_TOKENS: 1024 is left alone: a name counts only when it ends in a keyword such as token. Suppose the reply comes back with one escaped and one lower-case placeholder:

Run this from the api container to check the login:
`psql postgres://app:\[SECRET_1\]@db:5432/app`
If it fails, recreate the volume: the image only reads [secret_1] on first start.

Box ③ restores both to hunter2-staging, and the status line reads "Restored 2 placeholders (1 distinct of 1 in the mapping)". To check which variables a larger .env defines before you paste any of it, the .env File Parser lists them.

What gets redacted

CategoryExamplesWhat stays visible
AI provider keyssk-ant-…, sk-proj-…, hf_…, other sk- keys of 32+ charactersThe variable name
Cloud & SaaS tokensAKIA… / ASIA… and the AWS secret next to an aws…secret name, AIza…, ghp_…, github_pat_…, glpat-…, xoxb-…, Slack webhook URLs, sk_live_…, whsec_…, SendGrid, npm, PyPI, Telegram bot tokens, the token in a Feishu / Lark bot webhook URL and the key of a WeCom webhook URLThe variable name; for webhook URLs, the URL up to the token
JWT & auth headerseyJ….eyJ….…, Authorization: Basic …, Bearer …, kintone X-Cybozu-Authorization, Kakao KakaoAK …The header name and scheme
Private keysPEM blocks from -----BEGIN … PRIVATE KEY----- to the matching END lineNothing; the block becomes one placeholder
Passwords & connection stringspostgres://app:…@db, DB_PASSWORD=…, client_secret: …, ?api_key=…User, host, port and database
High-entropy stringsUnlabelled random strings of 32+ charactersEverything around them

The prefixes come from the vendors. GitHub documents ghp_, gho_, ghu_, ghs_ and ghr_ in its token format post. AWS lists AKIA and ASIA in its IAM identifier reference. Anthropic keys start with sk-ant- (Anthropic docs). Stripe pk_ publishable keys are not matched, because Stripe says they are safe to embed in client-side code. The other shapes are defined by standards: JWT by RFC 7519, Bearer by RFC 6750, Basic by RFC 7617, and PEM labels by RFC 7468. Four services common in China, Japan and Korea are matched by their fixed URL or header, as their docs show it: open.feishu.cn/open-apis/bot/v2/hook/ (Feishu), qyapi.weixin.qq.com/cgi-bin/webhook/…?key= (WeCom), X-Cybozu-Authorization, which kintone fills with the Base64 of login:password (cybozu developer network), and the KakaoAK scheme (Kakao).

Values that are obviously not secrets are skipped: ${DB_PASS} references, <your-key> templates, **** and literals such as true or null. An unlabelled string of 32+ base64 characters is redacted only when it mixes upper case, lower case and digits and reaches 4.2 bits of Shannon entropy per character. Random base64 of that length averages 4.56 bits. The mixed-case rule keeps git SHAs, SHA-256 digests and UUIDs readable. Lockfile sha512- hashes, data: URIs, file paths and certificate or public key blocks are excluded as well.

How this differs from gitleaks and log masking

Two kinds of tools already deal with secrets in text. Each covers a different moment.

  • Repository scanners such as gitleaks and TruffleHog find secrets that are already in files or git history. The gitleaks default config had 222 rules in September 2026, against 30 rules plus the entropy check here, and TruffleHog can test whether a key is still live. They report findings. They do not give you a copy to paste. Run them in a pre-commit hook or CI.
  • Log masking hides values with one fixed mask. In GitHub Actions, ::add-mask:: replaces each masked word with * (GitHub docs). The mask cannot be reversed, and every value looks the same, so an assistant cannot tell two keys apart.

This page covers the moment before a paste. Every distinct value gets its own numbered placeholder, the same value keeps it everywhere, and the reply can be turned back. To see it, press Load example: [OPENAI_KEY_1] appears in both the .env line and the retry log line, which shows the assistant that the retry used the configured key. Then type rotate [OPENAI_KEY_1] into box ③.

Limits

Not done hereUse instead
Scanning files, folders or git historygitleaks git / gitleaks dir or trufflehog on your machine
Personal data: emails, names, phone numbers, IP addressesEdit by hand. Hostnames stay on purpose so the assistant can still read your config.
Un-redacting one false positiveTurn off its category, or edit the copied text
Checking whether a key is still liveNot done, because it would mean sending the key to the provider
  • Input is limited to 1,000,000 characters. Above that, the status line reads "Input is N characters; the limit is 1,000,000. Split the text."
  • Every rule except the private key rule stops at the end of a line, so a token wrapped onto two lines is not detected. Copy from the raw file.
  • Switching a category on or off re-runs detection, and placeholder numbers can change. Restore with the same toggles you redacted with.
  • A long CamelCase identifier with a digit, such as AbstractSingletonProxyFactoryBean2Impl (4.33 bits), is redacted as high-entropy. Turn off that category if it gets in the way.

FAQ

Why not just ask the AI to remove the secrets?

Because the request itself is the leak. The key reaches the provider's servers and is kept under the provider's retention policy before any model reads your instruction. Detection here is a fixed set of regular expressions plus an entropy check that runs in your browser and sends no request, so the assistant receives only the redacted copy you paste.

Is my text uploaded or saved?

No. The page makes no network request with your text, and neither your text nor the placeholder mapping is written to localStorage, sessionStorage, cookies or the URL. The page also loads no analytics or ad scripts. The placeholder mapping exists only in the page's memory: Clear, Ctrl/Cmd+L, reloading or closing the tab discards it. JavaScript cannot overwrite a string in place, so the browser frees the memory on its next garbage collection.

Which keys and tokens does it detect?

Keys for Anthropic, OpenAI and other sk- providers, Hugging Face, AWS, Google, GitHub, GitLab, Slack, Stripe, SendGrid, npm, PyPI and Telegram; JWTs; Bearer and Basic authorization headers; PEM private key blocks; passwords inside URLs such as postgres://user:pass@host; values assigned to names ending in password, secret, token, api_key and similar; and long random-looking strings. It targets credentials only. Emails, hostnames and IP addresses stay as they are.

Can I use GitHub Actions' ::add-mask:: instead?

For GitHub Actions logs, yes: after you register a value with ::add-mask::, each masked word is replaced with * when the job prints it. It covers only those logs, it has to run before the value is printed, and every value becomes the same *, so an assistant cannot tell two keys apart and nothing in the reply can be mapped back. This page gives each distinct value its own numbered placeholder and can restore the reply.

What happens if the AI changes a placeholder?

Case changes, spaces inside the brackets and Markdown-escaped brackets are still restored. A placeholder the AI rewrote without its brackets is left as it is, because OPENAI_KEY_1 cannot be told apart from a variable name. When every copy of a placeholder lost its brackets, the status line shows fewer distinct placeholders than the mapping holds. Placeholders the AI invented are listed under the restore box.

Why wasn't my secret caught?

Secrets split across two lines, hex-only tokens with no telling variable name, and keys shorter than 32 characters with neither a known prefix nor a key name are not detected. Hex is excluded so that commit SHAs and checksums in CI logs do not bury the real findings. Read the redacted text before sending it, and give the value a name such as MY_SERVICE_TOKEN= if it was missed.