>_toolkitbox

~/tools / Prompt Redactor

Prompt Redactor — Mask keys, tokens and personal data before pasting into an AI

Mask API keys, tokens, private keys, emails, IP addresses and card numbers before you paste text into an AI chat, then put the originals back into the answer. Nothing leaves your browser.

What to mask

Documented formats — published by the vendor or in an RFC

Patterns that look like secrets — guessed from the shape or the name; may miss or over-match

Personal and network data — found by pattern

Masked text

The masked text appears here.

This finds text with a recognizable shape. It cannot find confidential information written in ordinary sentences, so not finding something does not mean it is safe.

Read the masked text before you send it.

Key formats were checked against vendor documentation and RFCs on 2026-10-23.

Everything runs in your browser. Neither your text nor the restore table is uploaded.

Prompts often contain more than you meant to share: a connection string in a stack trace, a key in a config file, a customer's email in a log line. This tool finds secrets and personal data that have a recognizable shape and replaces each with a placeholder such as [EMAIL_1]. The same value always gets the same placeholder, so the AI can still follow which is which. When the AI answers, paste its reply into the restore box and your originals are filled back in. It finds patterns, not meaning: text with no fixed shape, such as a confidential plan written in sentences, is not detected. Always read the result before you send it.

Use Cases

  • Cleaning a stack trace, log excerpt or config file before asking an AI to debug it
  • Sharing a code snippet that contains a connection string or token
  • Replacing real emails and IP addresses with placeholders in a support transcript

Usage

  1. Paste your text, or load the example.
  2. Check the list of what is detected and untick anything you do not want masked.
  3. Copy the masked text into the AI chat.
  4. Paste the AI's answer into the restore box to put your real values back.

What it can find

The tool matches text by its shape. These are the formats it recognizes by a documented prefix or structure.

TypeWhat it looks forWhat is documented
Private keyA block from -----BEGIN … PRIVATE KEY----- to the matching END lineRFC 7468 defines the BEGIN and END lines and the labels PRIVATE KEY and ENCRYPTED PRIVATE KEY. RSA, EC and OPENSSH labels are a convention.
AWS access key IDAKIA or ASIA followed by 16 capital letters or digitsAWS documents the prefixes: AKIA for access keys, ASIA for temporary keys. Its examples are 20 characters long.
GitHub tokenghp_, gho_, ghu_, ghs_, ghr_ or github_pat_GitHub documents the prefixes. Length and characters are not documented.
Slack tokenxoxb-, xoxp-, xapp- or xwfp-Slack documents these prefixes.
Stripe keysk_, pk_ or rk_ followed by test_ or live_Stripe documents these prefixes.
Anthropic API keysk-ant-api…Anthropic documents the prefix only.
JWTThree base64url parts separated by dots, the first starting with eyJRFC 7519 defines the three parts. Starting with eyJ is a common pattern, not a rule.
Authorization headerBearer, Basic or Token followed by a credentialRFC 6750 defines Bearer and RFC 7617 defines Basic.
Password in a URLscheme://user:password@hostRFC 3986 says the user:password form is deprecated.

Patterns that look like secrets

Some formats have no published shape. OpenAI keys, Google API keys and the assignment of a value to a name such as password, secret or api_key are matched by guesses, so they can miss a key or mask something harmless. The tool shows them in a separate group so you can turn them off.

Card numbers must have 13 to 19 digits, start like a major card network and pass the Luhn check digit. The check on the start of the number keeps 13-digit timestamps from being treated as cards. Stripe's documented test card number 4242 4242 4242 4242 is detected.

Why placeholders keep their names

The same value always gets the same placeholder, and each different value gets its own number: [EMAIL_1], [EMAIL_2]. The AI can still reason about which is which, for example that [IP_1] cannot reach [IP_2], without seeing the real addresses.

When you paste the AI's reply into the restore box, each placeholder it kept is replaced by the original value. If the AI rewrites or drops a placeholder, that one cannot be restored.

What it will not find

  • Names, addresses and phone numbers written in sentences.
  • Internal host names, customer IDs, project code names and other words that are only secret by context.
  • Keys in a format it does not know.
  • A secret that was already pasted somewhere. Masking now does not take it back.

Read the masked text before you send it. Not finding something is not proof that it is safe.

Sources (checked 2026-10-23): RFC 7468: Textual Encodings of PKIX, PKCS, and CMS Structures / RFC 7519: JSON Web Token (JWT) / RFC 6750: The OAuth 2.0 Bearer Token Usage / RFC 7617: The 'Basic' HTTP Authentication Scheme / RFC 3986: Uniform Resource Identifier (URI): Generic Syntax / AWS IAM: Understanding unique ID prefixes / GitHub Docs: About authentication to GitHub / Slack: Tokens / Stripe: API keys / Stripe: Testing

FAQ

What does it detect?

Private key blocks, JWTs, and tokens whose prefix the vendor documents (AWS access key IDs, GitHub, Slack and Stripe keys, Anthropic keys); Authorization headers, passwords in URLs, and values assigned to names such as password or api_key; and personal data: email addresses, IPv4 addresses and card numbers that pass the Luhn check.

Why are some detections called patterns that look like secrets?

Vendors document the prefix of some keys but not their length or exact characters, and some formats, such as OpenAI keys, are not documented at all. Those checks are guesses based on shape, so they can miss a key or mask something harmless. Untick a category if it gets in your way.

Does it guarantee that nothing sensitive is left?

No. It cannot recognize secrets that have no fixed shape, a name written in a sentence, or a key in a format it does not know. Read the masked text before you send it.

How does restoring work?

The tool keeps a table of placeholders and the values they replaced, in this page's memory only. When you paste the AI's reply, each known placeholder is swapped back. If you reload the page the table is gone, so keep the page open while you work.

Why was a number I wanted to keep turned into [CARD_1]?

Card detection looks for 13 to 19 digits that start like a major card network and pass the Luhn check, so an unrelated number can match by chance. Untick Card numbers to turn it off.

Is my text sent to a server?

No. Detecting and restoring both run in your browser.

Related