Skip to main content

PasteGuard

Version 1.1.2 · Production · Get it for Chrome and Edge · Get it for Firefox · Source code

In one sentence: PasteGuard is a free browser extension that automatically replaces sensitive text, such as API keys, email addresses and tokens, with safe placeholders when you paste into chosen websites like ChatGPT or Claude, entirely on your own device.

You copy something from your code, logs or documents, and paste it into an AI chat. If that text contains a secret, it has now left your machine. PasteGuard sits between the clipboard and the page. It looks at the pasted text, applies your rules, and inserts the cleaned version instead. The website never sees the original.

Who benefits: developers pasting stack traces and config files, professionals pasting client emails, and anyone who wants AI tools without handing them private data.

Core value: protection that works at the moment of the mistake, without changing how you work.

Watch the 1-minute demo.

Text before and after PasteGuard redaction
Before and after: real output from the extension with its default rules
PasteGuard options page in advanced mode
The options page in Advanced Mode: rule type, trigger, two-way and enabled per rule

The story behind PasteGuard​

AI chatbots are now part of everyday work, and moving quickly makes it easy to paste a customer record, a .env file or a token into a prompt. Existing answers sit elsewhere: company-wide data-loss-prevention tools that individuals and small teams cannot get, policies that rely on remembering at the wrong moment, or redacting by hand. PasteGuard does the redaction at the clipboard, locally, with rules you control. Read the full story.

Problems it solves​

"I pasted an API key into ChatGPT"​

You paste a code snippet to get help and notice afterwards that it contained a live key. The key may now sit in a chat history or training pipeline, and you have to rotate it. PasteGuard's default secret rule replaces common key and token formats with [REDACTED_SECRET] as you paste.

Searches people use: how to stop pasting secrets into ChatGPT, prevent API key leak AI chatbot, redact sensitive data before pasting into AI.

"I don't want to send client emails and names to an AI"​

Customer emails and addresses are personal data. The default email rule swaps any email address for personx@example.com. You can add your own rules for names or internal project codenames.

Searches: remove email addresses from clipboard, anonymise text before pasting into LLM.

"I need the real values back after the AI answers"​

Literal rules can be two-way: paste replaces AcmeCorp with ClientA, and copying from the page replaces ClientA with AcmeCorp, so the AI's answer is usable.

Searches: pseudonymise prompt then restore, reversible redaction for LLM prompts.

"A tool that blocks everything breaks my login"​

PasteGuard's smart skip leaves password, email, phone, OTP and similar fields alone so password-manager pastes keep working.

Searches: extension breaks paste into password field.

Features and what to expect​

FeatureHow it worksPractical benefit
Paste and copy interceptionCapturing-phase paste and copy listeners run before the page sees the eventRules apply before the site can read the text
Literal rulesExact text match, case-insensitive, every occurrence replacedPredictable swaps for names and codenames
Regex rulesA JavaScript regular expression, global matchPattern redaction for keys, emails, tokens
Two-way restoreLiteral rules only: the reverse swap runs on the opposite actionReversible pseudonyms
Trigger per ruleEach rule runs onPaste or onCopySanitise inbound text or outbound text
Guarded sitesRules run only on hostnames in your list (exact hostname match). Defaults: www.google.com, chatgpt.com, claude.ai, chat.deepseek.comUntouched behaviour everywhere else
Smart skip login fieldsSkips password, email and tel inputs and fields whose name, id, class, placeholder or aria-label exactly equals a login keyword (for example otp, username, token)No broken logins
Chatbot copy buttonsHandles the built-in "Copy" buttons on ChatGPT, Claude, Google AI answers and DeepSeekCopy-from-AI is covered too
Advanced modeReveals rule type, two-way, enabled toggles and the guarded-sites editorSimple by default, powerful on demand
Live syncSettings sync through browser storage and apply without a reloadChanges take effect at once
Local onlyManifest requests only the storage permission and makes no network callsNothing leaves your device

Limitations​

  • Redaction runs only on guarded sites. A site not in your list is unprotected.
  • Hostname matching is exact: chatgpt.com does not cover other subdomains unless you add them.
  • Only plain text (text/plain) pastes into editable fields are transformed; pasting files or images is untouched.
  • Regex rules cannot be two-way. Pattern redaction is not a guarantee: a secret in a format your rules do not match will pass through. Review your rules.
  • Copy-button handling relies on each chatbot's page structure and may need updating when those sites change.

Quick start​

  1. Install from the Chrome Web Store or Firefox Add-ons.
  2. Open chatgpt.com or claude.ai, and paste text containing an email address.
  3. It arrives as personx@example.com. Open the options page to add your own rules.

Full guide: Getting started, Rules and examples, Troubleshooting and FAQ.

Frequently asked questions​

Does PasteGuard send my data anywhere? No. The manifest requests only the storage permission and the code makes no network requests.

Which sites are protected? Only hostnames in your guarded-sites list. The defaults are www.google.com, chatgpt.com, claude.ai and chat.deepseek.com.

Will it catch every secret? No. Rules match patterns; a secret in an unrecognised format passes through. Review and extend the rules.

Creative and unconventional uses​

  • Reversible pseudonyms for client work. Scenario: you ask an AI to improve an email to a named client. Rule: Acme Ltd ↔ Client A, two-way. Paste hides the name, copying the AI's answer restores it.
  • Strip tracking from copied links. A regex on [?&]utm_[^\s&]+ with an empty replacement, trigger onCopy, on a site you guard, cleans links you share.
  • Normalise environment URLs. Replace staging.example.com with example.com on copy when writing docs.
  • Team training aid. Share a rule set so teammates experience what the AI would have seen.
  • Fixed boilerplate expansion. A literal rule turns a short token like ;sig into a signature block when you paste it.

Each use case relies only on the rule types and triggers described in this page.

Next steps​