AI gets the context. Not your secrets.
Automatically hides names, emails, and API keys before you send prompts to AI.
Quick Start · Chat · Coding Tools · Documentation
Detects 30+ types of sensitive data across 24 languages.
Your data never leaves your machine.
Chat — Masks PII and secrets when you paste into ChatGPT, Claude, and Gemini. You see originals, AI sees placeholders.
Apps — Open WebUI, LibreChat, or any self-hosted AI setup. Optionally routes sensitive requests to a local model.
Coding Tools — Cursor, Claude Code, Copilot, Windsurf — your codebase context flows to the provider. PasteGuard masks secrets and PII before they leave.
API Integration — Sits between your code and OpenAI or Anthropic. Change one URL, your users' data stays protected.
Run PasteGuard as a local proxy:
docker run --rm -p 3000:3000 ghcr.io/sgasser/pasteguard:enPoint your tools or app to PasteGuard instead of the provider:
| API | PasteGuard URL | Original URL |
|---|---|---|
| OpenAI | http://localhost:3000/openai/v1 |
https://api.openai.com/v1 |
| Anthropic | http://localhost:3000/anthropic |
https://api.anthropic.com |
# One line to protect your data
client = OpenAI(base_url="http://localhost:3000/openai/v1")European Languages
For German, Spanish, French, Italian, Dutch, Polish, Portuguese, and Romanian:
docker run --rm -p 3000:3000 ghcr.io/sgasser/pasteguard:euFor custom config, persistent logs, or other languages: Read the docs →
Route Mode
Route Mode sends requests containing sensitive data to a local LLM (Ollama, vLLM, llama.cpp). Everything else goes to OpenAI or Anthropic. Sensitive data stays on your network.
Open-source browser extension for ChatGPT, Claude, and Gemini.
- Paste customer data → masked before it reaches the AI
- AI responds with placeholders → you see the originals
- Works with the same detection engine as the proxy
Currently in beta. Apache 2.0.
Protect your codebase context and secrets when using AI coding assistants.
Claude Code:
ANTHROPIC_BASE_URL=http://localhost:3000/anthropic claudeCursor: Settings → Models → Enable "Override OpenAI Base URL" → http://localhost:3000/openai/v1
Every request is logged with masking details. See what was detected, what was masked, and what reached the provider.
Personal data — Names, emails, phone numbers, credit cards, IBANs, IP addresses, locations. Powered by Microsoft Presidio. 24 languages.
Secrets — API keys (OpenAI, Anthropic, Stripe, AWS, GitHub), SSH and PEM private keys, JWT tokens, bearer tokens, passwords, connection strings.
Both detected and masked in real time, including streaming responses.
Bun · Hono · Microsoft Presidio · SQLite
See CONTRIBUTING.md for guidelines on how to contribute.
