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.
Works Everywhere
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-compatible or Anthropic APIs. Change one URL, your users' data stays protected.
Quick Start
Run PasteGuard as a local proxy:
docker run --rm -p 3000:3000 ghcr.io/sgasser/pasteguard:en
Point your tools or app to PasteGuard instead of the provider:
| Target | PasteGuard URL | Original URL |
|---|---|---|
| OpenAI | http://localhost:3000/openai/v1 |
https://api.openai.com/v1 |
| Anthropic | http://localhost:3000/anthropic |
https://api.anthropic.com |
| Codex CLI | http://localhost:3000/codex |
https://chatgpt.com/backend-api/codex |
# 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:eu
For 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 the configured cloud provider. Sensitive data stays on your network.
Chat
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.
Coding Tools
Protect your codebase context and secrets when using AI coding assistants.
Claude Code:
ANTHROPIC_BASE_URL=http://localhost:3000/anthropic claude
Cursor: Settings → Models → Enable "Override OpenAI Base URL" → http://localhost:3000/openai/v1
Codex CLI: Configure a custom provider with base_url = "http://127.0.0.1:3000/codex". See the coding tools docs for the full snippet.
Dashboard
Every request is logged with masking details. See what was detected, what was masked, and what reached the provider.
What it catches
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.
Tech Stack
Bun · Hono · Microsoft Presidio · SQLite
Contributing
See CONTRIBUTING.md for guidelines on how to contribute.