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.


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
| Feature | How it works | Practical benefit |
|---|---|---|
| Paste and copy interception | Capturing-phase paste and copy listeners run before the page sees the event | Rules apply before the site can read the text |
| Literal rules | Exact text match, case-insensitive, every occurrence replaced | Predictable swaps for names and codenames |
| Regex rules | A JavaScript regular expression, global match | Pattern redaction for keys, emails, tokens |
| Two-way restore | Literal rules only: the reverse swap runs on the opposite action | Reversible pseudonyms |
| Trigger per rule | Each rule runs onPaste or onCopy | Sanitise inbound text or outbound text |
| Guarded sites | Rules run only on hostnames in your list (exact hostname match). Defaults: www.google.com, chatgpt.com, claude.ai, chat.deepseek.com | Untouched behaviour everywhere else |
| Smart skip login fields | Skips 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 buttons | Handles the built-in "Copy" buttons on ChatGPT, Claude, Google AI answers and DeepSeek | Copy-from-AI is covered too |
| Advanced mode | Reveals rule type, two-way, enabled toggles and the guarded-sites editor | Simple by default, powerful on demand |
| Live sync | Settings sync through browser storage and apply without a reload | Changes take effect at once |
| Local only | Manifest requests only the storage permission and makes no network calls | Nothing leaves your device |
Limitations
- Redaction runs only on guarded sites. A site not in your list is unprotected.
- Hostname matching is exact:
chatgpt.comdoes 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
- Install from the Chrome Web Store or Firefox Add-ons.
- Open
chatgpt.comorclaude.ai, and paste text containing an email address. - 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.comwithexample.comon 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
;siginto a signature block when you paste it.
Each use case relies only on the rule types and triggers described in this page.
Next steps
- Get started: PasteGuard documentation
- Read why it exists: the story behind PasteGuard
- Related: PasteGuard is independent of the other products. If you also send notifications to your own users, see Notification Service.
- Back to all products