People
Names, emails and phone numbers of colleagues, patients and customers.
macOS and Linux. Windows, Cargo and Docker: see installation. Source on GitHub.
Shadow is an open-source privacy layer that sits between your apps and AI providers such as OpenAI, Anthropic and Google Gemini. It finds personal data, customer names, credentials and internal identifiers in every outbound prompt, replaces them with realistic, format-preserving fakes, and translates the fakes back in the response. It is PII redaction and AI data loss prevention that keeps ChatGPT-style assistants, Claude, coding agents and your own LLM apps useful. It runs as a local HTTPS proxy, a gateway base URL, a Docker sidecar or the shadow-core Rust library, and the mapping between real and fake values never leaves the machine.
The problem
People paste whatever makes the answer better. Policies say “don’t”, and people do it anyway, because the tool is useful. This is what ends up in a request to an AI provider:
Names, emails and phone numbers of colleagues, patients and customers.
Customer lists, invoices with IBANs and cards, contracts with addresses.
API keys, tokens and passwords pasted along with a config file or a stack trace.
Internal hostnames, IP addresses and file paths that contain your username.
Your company name, clients and the codenames of unreleased projects.
Uploaded spreadsheets, Word documents, slides and PDFs full of all of the above.
How it works
Shadow sits between your tools and the model. The provider gets a coherent prompt about a company that does not exist. You get an answer about yours.
You write
Draft a renewal reminder to Jane Doe (jane@acme.com) at Acme GmbH. Card on file: 4111 1111 1111 1111. Logs are in /Users/jdoe/billing.
The provider sees
Draft a renewal reminder to Hui Zhao (hui.zhao@zhilan.cn) at Zhilan Technology Co., Ltd.Card on file: 4837 2191 9471 3480. Logs are in /Users/huizhao/billing.
Requests reach Shadow through HTTPS_PROXY, a gateway base URL or the Rust API. Only known AI hosts are decrypted; everything else is tunnelled untouched.
Checksummed patterns, emails, phones, secrets, hostnames, IPs and paths, your own dictionary of customers and codenames, and optional local NER or Presidio.
Each value gets a consistent, format-preserving fake from your machine’s persona, or a typed token for bulk reports. Secrets can be redacted outright.
Fakes in the answer are turned back into real values: full responses, streamed tokens and tool-call arguments, before your tool sees them.
Features
Detection is only the start. Shadow handles what sits around it, so AI tools keep working on masked data.
Every value maps to a stable fake of the same format from one persistent persona, so answers stay useful.
The real-to-fake mapping lives in an encrypted vault on your machine and never leaves it.
Checksummed patterns, secrets, machine facts, your dictionary, plus optional NER or Presidio.
Fakes split across SSE events are reassembled; tool-call arguments are restored before your tools run.
Act, report, code or converse: each request gets the right treatment, from fakes to typed tokens.
Text, CSV, JSON, DOCX, XLSX, PPTX and PDF uploads are masked, and Office files stay valid.
One Rust binary for macOS, Linux and Windows. No account, no hosted component, no telemetry.
HTTPS proxy for every app, a gateway base URL for SDKs, a Docker sidecar, or a Rust library.
Apache-2.0, free to use and audit. Methodology and benchmarks are published and reproducible.
Activity dashboard
Find out what your AI tools actually send before anything leaves the machine: how much traffic goes to which model, what Shadow masked, and what it blocked.
A status icon on Mac and Windows with live counts and a quick pause.
Trends over time by data type, destination such as ChatGPT or Claude, and source app.
shadow topThe same live view in your terminal, over SSH and on servers.
Benchmarks
Measured on a held-out test set with a reproducible benchmark: the share of sensitive values that still reached the model. Lower is better.
| Tool | Leaked |
|---|---|
| Shadow + open-weight NER sidecar | |
| Shadow + Presidio detector | |
| Shadow, built-in rules only | |
| OpenAI Privacy Filter | |
| GLiNER | |
| Microsoft Presidio | |
| LLM Guard |
Integrations
No code changes for most tools: point them at Shadow with one environment variable or a base URL.
HTTPS_PROXY=http://127.0.0.1:8877GatewayAnything with a base URLOPENAI_BASE_URL=http://127.0.0.1:8877/gw/openai/v1SidecarServices in Docker or Kuberneteslocalhost:8877 next to your serviceLibraryRust servicesshadow-core, masking in-processCompare
Blocking breaks the tool, so people route around it. Placeholders keep requests flowing but destroy meaning. Shadow translates.
| Capability | Blocktypical DLP gateway | Redactplaceholders | Shadowreversible fakes |
|---|---|---|---|
| Request still reaches the model | No | Yes | Yes |
| Model sees coherent, realistic data | — | No, <PERSON> tags | Yes, format-valid fakes |
| Answer refers to your real data | — | No | Yes, restored locally |
| Streaming and tool calls | Blocked | Placeholders leak into arguments | Restored on the fly |
| Where it runs | Network edge or cloud | Library or service | On the endpoint, or in-process |
Shadow vs Presidio, LLM Guard, LiteLLM, Nightfall and 30 more
Who it’s for
Developers, security and privacy teams, and platform teams building LLM features use the same binary.
FAQ
Short answers to what people ask first.
Give people an AI tool that is safe to paste into instead of one they have to avoid. Route your API-based AI clients (internal chat apps, SDK-based tools, coding assistants, agents) through Shadow, and customer names, emails, IDs and secrets are replaced with fakes before the request leaves the machine, while the answer still comes back with the real values. Shadow intercepts provider APIs such as api.openai.com and api.anthropic.com, not consumer web apps like chatgpt.com, so pair it with a policy that points staff at an approved API-backed client. See use cases.
It is a complement more than a replacement. Microsoft Presidio is a detector and anonymizer library that replaces values with placeholders or hashes. Shadow adds what sits around detection: consistent, format-preserving fakes from one persona, an encrypted mapping, restoration of responses, streams and tool calls, and a ready-made HTTPS proxy and gateway. Shadow can call Presidio as an extra detector. See Shadow vs Presidio.
Claude Code and other tools that accept a base URL (ANTHROPIC_BASE_URL, OPENAI_BASE_URL) or honour HTTPS_PROXY work through gateway mode or proxy mode, and the code intent keeps identifiers readable. Cursor and GitHub Copilot send traffic to their vendors' own backends, which are not on Shadow's built-in host list; you can add hosts with extra_hosts, but check the request log before relying on it, and clients that pin certificates cannot be intercepted. See integrating any endpoint.
No tool makes an organisation compliant on its own. Shadow helps you meet data-minimisation, confidentiality and transfer requirements under GDPR and HIPAA by keeping personal data and PHI out of requests to AI providers, and its mapping never leaves your machine. Whether you are compliant still depends on your whole programme: contracts, policies, access control and what else you send. See industries.
Yes. Shadow is a single binary that runs on your laptops, servers or containers, with no cloud service, account or telemetry. Detection, the persona and the encrypted vault are all local, and optional detectors (a NER model, Presidio) run on addresses you choose. The only outbound traffic is the masked request you were already sending, and you can point it at a self-hosted model endpoint instead of a cloud provider.
Yes. Every fake in the response is turned back into the real value, including streamed SSE and NDJSON responses where a fake is split across events. Tool-call arguments are restored on your machine before your tools run, so an agent's email reaches the real address. Tools hosted in the provider's cloud are handled by an explicit policy. See tool calls and agents.
Nothing. Shadow is free and open source under the Apache-2.0 licence, with no account, licence key or usage fees. You keep paying your AI provider as before.
Detection combines checksummed patterns (cards, IBANs, national IDs), secrets and machine identifiers, your own dictionary of names and codenames, and an optional local NER model or Presidio for free-text names. Results depend on your data, so Shadow publishes its methodology and measurements on the benchmarks page, and shadow scan shows what would be masked in your own files before you rely on it.
Usually not, because the model still sees coherent data: a fake email is still an email, two different people stay two different people, and a fake card still passes Luhn. That is the main difference from placeholder redaction, which breaks the model's ability to reason about the values. For bulk reports Shadow switches to typed tokens such as [PERSON_0001], which are restored in the answer.
OpenAI, Anthropic, Google Gemini and Vertex AI, Azure OpenAI, AWS Bedrock, OpenRouter, Mistral, Groq, Together AI, DeepSeek, xAI, Cohere, Perplexity and more, plus any custom or self-hosted HTTPS model API you add. See supported providers.
Free and open source under Apache-2.0. One binary, no account, nothing to sign up for.