Glossary

What is PII masking?

PII masking is the practice of detecting personal identifiers in text and replacing them with placeholders before sending the text to an external system.

Definition

PII masking — short definition

PII masking: PII masking is the practice of detecting personal identifiers in text and replacing them with placeholders before sending the text to an external system.

Why it matters

Why this matters

LLM prompts routinely contain customer data. Without masking, that data is exposed to whichever third-party provider you call. Masking at the gateway shrinks that exposure surface to zero.

How it works

How it works

  1. Step 1

    Detect

    Inbound prompts are scanned for known personal-data patterns.

  2. Step 2

    Map

    Each detected value is replaced with a stable placeholder for the request.

  3. Step 3

    Forward & rehydrate

    Only the masked prompt is sent; placeholders in the response are restored before reaching your app.

Implementation

Learn how this works in Privian

From definition to implementation, docs and architecture — the same idea at different layers.

FAQ

Frequently asked questions

Is PII masking the same as redaction?
Redaction usually removes data outright. Masking replaces it with a placeholder so structure is preserved and the original can be restored later if needed.
Does PII masking break the model output?
Not if placeholders are deterministic within a request. The gateway can rehydrate them on the way back so your app sees the original values.
What is masked by default?
Common identifiers — names, emails, phone numbers and similar. The detector set evolves over time.