How It Works

NoPII sits between your application and the LLM provider. Every request is scanned for PII, which is replaced with tokens before the request reaches the LLM. Responses are detokenized on the way back.

Tokenization flow

Your App → NoPII → Detect PII → Tokenize → LLM Provider
                                                          ↓
Your App ← NoPII ← Detokenize ←──────────── LLM Response

Step by step:

  1. 1Request arrives - NoPII identifies your account from the LLM API key in the request.
  2. 2PII detection - Message content is scanned for PII. Entities above the confidence threshold are extracted.
  3. 3Tokenization - Each unique PII value is replaced with a deterministic token.
  4. 4PII replacement - Original PII is replaced with wrapped tokens, e.g. [PERSON: aBcDeFgH12]
  5. 5Forward to LLM - The sanitized request is sent to the LLM provider. No PII reaches the provider.
  6. 6Detokenize response - Tokens in the LLM response are replaced with the original PII values.
  7. 7Return to caller - Your application receives a clean response with all original data intact.

Before and after

Here's what your prompt looks like before and after NoPII processes it:

Your prompt (sent to NoPII):

Summarize the case for John Smith, SSN 123-45-6789, who lives at 42 Oak Avenue.

What the LLM sees:

Summarize the case for [PERSON: aBcDeFgH12], SSN [US_SSN: iJkLmNoPqR], who lives at [LOCATION: sTuVwXyZ34].

What you get back:

The case for John Smith (SSN 123-45-6789) at 42 Oak Avenue involves...

Deterministic tokenization

The same plaintext always produces the same token. This means:

  • The LLM can reason about relationships ("John Smith" in message 1 is the same entity in message 5)
  • Token mappings are cached per session for faster processing

Letter case in names

Names, places, organizations, nationalities and dates are tokenized without regard to letter case: "Mary Lincoln", "mary lincoln" and "MARY LINCOLN" get one token, so the LLM can tell they are one person. The reply is restored with the spelling your session first used. Identifiers such as emails, phone numbers, codes and account or government IDs are exact: two spellings are two values. A token revealed outside its session, through the client API, comes back in lower case.

Detection does not depend on letter case either: a name typed as "Jane doe" or "JAne DOe" is detected whole, and a name your session has already tokenized is tokenized again in any spelling.

Token retention

Vault tokens are not stored indefinitely. Each token has a time-to-live (TTL) that controls how long the token-to-PII mapping is retained. When a token expires, the mapping is permanently deleted. If the same PII appears in a future request after expiration, a new token is generated.

The TTL depends on your plan: 1 day on Lite, 30 days on Starter, and configurable from 1 day to permanent on Growth and Business in the admin console. See Billing & Pricing for plan details.

Supported PII entity types

NoPII detects 11 PII entity types by default (marked default below), with additional types available that can be enabled on demand (marked available below). You can enable or disable individual types and adjust the confidence threshold in the admin console. See PII Configuration for the full reference.

Identity

Entity TypeStatusExample
PERSONdefaultJohn Smith
EMAIL_ADDRESSdefaultjohn@example.com
PHONE_NUMBERdefault(555) 123-4567
DATE_TIMEavailableMarch 15, 1990
LOCATIONdefault123 Main St, NYC
NRPavailableEthnicity / nationality

Government IDs

Entity TypeStatusExample
US_SSNdefault123-45-6789
US_PASSPORTdefaultC03005988
US_DRIVER_LICENSEdefaultD1234567
UK_NHSavailable943 476 5919
AU_TFNavailable123 456 782
IT_FISCAL_CODEavailableRSSMRA85T10A562S

Financial

Entity TypeStatusExample
CREDIT_CARDdefault4111 1111 1111 1111
IBAN_CODEdefaultDE89 3704 0044 0532 0130 00
US_BANK_NUMBERavailable1234567890
CRYPTOavailable1A1zP1eP5QGefi2DMPTfTL...
ACCOUNT_IDavailableMember ID W239847561

Technical

Entity TypeStatusExample
IP_ADDRESSdefault192.168.1.1
CREDENTIALdefaultsk-proj-abc123...
URLavailablehttps://internal.corp.com
MEDICAL_LICENSEavailableMD12345

This is a representative list. NoPII also includes detection for API keys, tokens, and secrets (CREDENTIAL) and enhanced street address detection (LOCATION). See PII Configuration for the full reference and configuration options.

Fail-safe architecture

NoPII fails closed. If PII detection or tokenization cannot complete, the request is blocked rather than sent unprotected, and nothing reaches the LLM. Every failure in this step, whether a tokenization service error, a timeout, a connection error or a detection failure, returns HTTP 503 with a JSON body. See Error Handling for the full error policy.

What NoPII scans

Fail-closed blocking covers service failures. What gets tokenized depends on what detection finds, so it helps to know the scope:

  • Text is scanned. Message content, system prompts, tool call arguments and tool results are checked for PII.
  • Images, audio, files and documents are not scanned. Non-text content parts are forwarded to the provider as they are. Extract the text first if you want NoPII to protect it.
  • Values detection does not recognize are forwarded. Detection covers the entity types you enable, above your confidence threshold. A value it does not identify as PII is sent to the LLM unchanged. Enable the entity types your data contains and check representative prompts with detection preview.