An LLM privacy proxy is a layer between your applications and a language model that detects sensitive values in each prompt and replaces them before the request leaves your environment. The model works only on de-identified text, and when the proxy uses consistent, reversible tokens, it can restore the original values in the response before a user sees it. That lets teams send real customer conversations, documents, and records to third-party models without exposing the people in them.

How an LLM privacy proxy works

An LLM privacy proxy sits in the request path between your application and a hosted model, often alongside or inside an AI gateway that already handles routing, authentication, and rate limits. A proxy, in this sense, is a service that receives a request on the application's behalf and forwards it onward, here after changing what the request contains. It acts as a privacy layer for AI traffic, applying data de-identification to each prompt in flight rather than to a dataset at rest. Every request moves through five steps:

  1. Intercept. The application sends its prompt to the proxy instead of directly to the model provider.
  2. Detect. The proxy scans the prompt for sensitive entities such as names, account numbers, and addresses.
  3. Transform. Each detected value is replaced with a token or a synthetic stand-in.
  4. Forward. The de-identified prompt goes to the model, which reasons over it as usual.
  5. Restore. If the design allows, the proxy swaps the original values back into the response.

A support transcript shows the effect:

Before: Hi, this is Maria Delgado. Account 4417-2290-118 was charged twice; please send the refund to 82 Larkspur Lane, Dayton.
After:  Hi, this is NAME_GIVEN_k3P9x NAME_FAMILY_7Rm2q. Account ACCOUNT_NUMBER_Qw81z was charged twice; please send the refund to LOCATION_ADDRESS_Ht5Lc.

The model can still summarize the complaint, classify it, and draft a reply, but the provider never receives the customer's identity. That placement is the whole design. Instructing a model to disregard personal data does nothing to keep that data from the provider, because the data has already crossed the boundary by the time the model reads the instruction. OWASP's 2025 Top 10 for LLM Applications ranks sensitive information disclosure as the second-highest risk and names tokenization as a mitigation, a control that only works when it runs before the request leaves. Teams run Tonic Textual as a privacy proxy for chatbot and LLM traffic, where it handles the detect and transform steps on each request.

What a privacy proxy has to catch in a prompt

Detection decides whether an LLM privacy proxy works, because anything it misses travels to the provider untouched. PII in prompts arrives through more channels than the chat box:

  • User-typed free text, where people type names, phone numbers, and account details.
  • Pasted documents and transcripts, such as contracts, call notes, and email threads.
  • Structured payloads like JSON and HTML, where identifiers sit in nested fields and markup.
  • Context retrieved by a RAG step, pulled from internal knowledge bases and appended to the prompt.
  • Tool arguments in agent calls, where an agent passes customer records into the functions it invokes.

Pattern matching handles part of this: regular expressions reliably find Social Security numbers, email addresses, and card numbers, because those follow fixed formats. They miss most other personally identifiable information: a name written in a sentence, an address described in prose, or a claim number in an insurer's internal format. That gap is the central difficulty of de-identifying unstructured text, where sensitive data has no fixed column. Named entity recognition (NER), the task of locating spans of text and classifying them as people, organizations, locations, and other entity types, carries most of the load because it reads context rather than shape.

Detection quality can be measured. Against human-annotated data in Tonic.ai's PrivacyBench benchmark, Tonic Textual posted the two highest PII-detection F1 scores of any engine tested, 92.5% and 92.1%, ahead of frontier LLMs from OpenAI and Anthropic and the open-source tools Presidio and GLiNER2. On recall, Textual's detection caught 94.3% of PII, more than 7 points more than any non-Textual engine tested, while keeping precision above 90%. Recall is the figure that maps to a proxy's failure mode, since every missed mention is a value the provider receives.

Removing direct identifiers isn't the whole job. Quasi-identifiers are details that identify someone in combination even after names are gone: a job title, an employer, a city, and an admission date can together point to one person. That is how re-identification through quasi-identifiers works, so a proxy should treat dates, organizations, locations, and roles as entity types in their own right.

The Tonic Advantage: detection that holds up on real prompts. Prompts are messy: clinical shorthand, transcribed speech, legal boilerplate, half-pasted tables. Tonic Textual's proprietary NER models are built for that kind of domain text, where generic detection underperforms. Detection can also be layered: with LLM classification enabled on a redaction request, an LLM reviews the entities the NER model found and removes false positives, so the proxy doesn't scramble words the model needs. Only the detected entities go to the LLM, not the full prompt, which keeps the added cost and latency low. Teams can also define custom entity types for identifiers that exist only inside their business.

Redact, tokenize, or synthesize: choosing what replaces the data

What the proxy puts in place of a sensitive value shapes both the quality of the model's answer and whether the original can come back. Three replacement strategies cover most designs, and they correspond to the core de-identification techniques, from tokenization to synthetic replacement.

Redaction to a generic placeholder swaps every detected value for a label such as [NAME]. It's safe, but it costs the model its ability to tell people apart. If a transcript involves a customer, her manager, and a support agent, all three become [NAME], and a summary of who promised what turns into guesswork. Knowing how redaction differs from anonymization helps here, because a placeholder removes the value without preserving any of the structure around it.

Consistent tokens solve that problem. A token is a stand-in string that encodes the entity type plus a unique identifier, such as NAME_GIVEN_12m5s, and the same input produces the same token every time it appears. The model can track three distinct people across a long thread, and because each token corresponds to exactly one original value, the proxy can map tokens back afterward.

Synthetic replacement substitutes realistic values: Maria Delgado becomes Joan Pierce, and an account number becomes another plausible one. The text reads naturally, and cues such as gender or locale can carry through. The tradeoff is reversibility. Synthetic values aren't built to be mapped back, and a stand-in can collide with a real value elsewhere in the prompt, which makes any reverse lookup ambiguous.

The choice follows from what happens to the output. Use tokens when the response must be restored for an end user, as in a support copilot drafting a reply to a named customer. Use synthesis when the output itself is stored, analyzed, or shown without restoration. Tonic Textual lets teams set handling options for each entity type, synthesizing names while tokenizing account numbers, for example. Its replacements are consistent, so a repeated value receives the same token or synthetic stand-in each time.

StrategyWhat the model seesReversible?Best fit
Redaction to a placeholder[NAME], [ACCOUNT]: one label for every value of a typeNoLogs or analysis where individual identities don't matter
Consistent tokensNAME_GIVEN_12m5s: one stable token per distinct valueYes, through a mappingResponses that must be restored for the end user
Synthetic replacementRealistic stand-ins such as Joan PierceNoOutputs kept, analyzed, or shown without restoration

Restoring the response, and what reversibility means for compliance

Restoration is the step that makes tokenization useful to end users. For each session, the proxy keeps a mapping of tokens to original values. When the model's response comes back, for example I've issued a refund to NAME_GIVEN_k3P9x, the proxy replaces each token with its original value and returns the restored text to the application. Tonic Textual supports this pattern directly: its tokens are unique to each original value, and an unredact call maps them back to the originals. The provider never receives the real name, account number, or address.

That design has a consequence compliance stakeholders need to understand: a reversible proxy produces pseudonymized data, not anonymized data. Pseudonymization replaces identifiers with substitutes while a separate means of linking them back still exists. Anonymization leaves no route back to the individual. The mapping store is that route, which makes it the most sensitive asset in the architecture. Four questions frame how to govern it:

  • Storage location. Does the mapping live in memory, a cache, or a database, and inside which network boundary?
  • Access. Which services and people can read it, and is that access logged?
  • Retention. Is it discarded when the session ends, or kept for audit and replay?
  • Logging. Do proxy or gateway logs capture original prompts, recreating the exposure the proxy exists to prevent?

The distinction carries into regulation, and the difference between anonymization and pseudonymization is where it starts. GDPR treats pseudonymized data as personal data wherever additional information can still attribute it to a person, while information that is truly anonymous falls outside the regulation's scope. Whether a given prompt flow lands on one side or the other depends on facts a legal team has to assess, such as who holds the mapping and what else a recipient could combine with the de-identified text. That assessment turns on whether de-identified data still counts as personal data, and the answer shapes contracts and data processing terms. A well-governed proxy helps teams meet those obligations; it doesn't settle them on its own.

Where a privacy proxy fits, and where it doesn't

An LLM privacy proxy is an inference-time control: it protects what you send to a model, not what a model has already learned.

Where a proxy fits

A proxy fits traffic flowing to third-party models at the moment of use: chat assistants, support copilots, document summarization, and agent tool calls. In each case, data is assembled into a prompt at request time, and the proxy is the last point where you control what leaves; an AI gateway that already sees every request is often the natural host. Three practical considerations shape the deployment:

  • Latency. Detection runs on every request, so the detector's size matters. Tonic Textual's NER model is a small, efficient encoder-based model rather than an LLM, which makes it faster and cheaper to run than LLM-based PII detection.
  • Deployment location. A self-hosted proxy keeps raw prompts inside your environment from start to finish, while a cloud detection service receives each raw prompt once before anything else does.
  • Imperfect detection. No detector catches everything, so the proxy works alongside access controls and data minimization rather than replacing them.

The Tonic Advantage: de-identification as a step in the developer's workflow. A gateway isn't the only place to scrub a prompt. With the Textual MCP server, an AI client can de-identify plain text, JSON, or HTML on demand, so sensitive content is cleaned on its way into a prompt from the tool a developer already works in. The same proprietary NER models do the detection; only the place the call happens changes.

What a proxy doesn't cover

A proxy does nothing for data used to train or fine-tune a model. Memorization happens at training time, so a model fine-tuned on raw support tickets can reproduce a customer's details however carefully its prompts are filtered. That problem calls for removing PII from fine-tuning and post-training data and, more broadly, de-identifying training corpora before they reach a training job. A RAG index is similar: if documents enter the vector store with names intact, the proxy has to catch them on every retrieval, whereas cleaning the index at ingestion removes them once.