> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devic.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Mask PII

> Protect personal and sensitive data in prompts using Devic’s Mask PII guardrail.

The **Mask PII** guardrail detects and masks personally identifiable information (PII) in the input text before it reaches the model. Its purpose is to ensure that agents do not process data that could compromise privacy or expose regulated information.

This guardrail scans the incoming text and automatically replaces sensitive data with safe placeholders, preserving the user’s intent without revealing their information.

<img src="https://mintcdn.com/devic/cVxkg9x2JN5RWih7/maskPII.png?fit=max&auto=format&n=cVxkg9x2JN5RWih7&q=85&s=4a15369eb32c01509202745ad0584b51" alt="Mask PII configuration interface in Devic" width="1912" height="940" data-path="maskPII.png" />

***

## What Mask PII Detects

Mask PII analyzes the user’s input and replaces any detected personally identifiable information with a generic placeholder.\
Examples:

* “My card is 4111 1111 1111 1111” → “My card is \[CREDIT\_CARD\_NUMBER]”
* “I live at 123 Main St, NY” → “I live at \[LOCATION]”
* “My email is [john.doe@example.com](mailto:john.doe@example.com)” → “My email is \[EMAIL\_ADDRESS]”

This allows the agent to work with the message **without exposing real data**.

***

## Configurable PII Categories

Devic allows you to enable or disable specific types of PII to be masked in user inputs.\
Available types include:

### **Global Identifiers**

* Credit card number
* Cryptocurrency wallet
* Date and time
* Email address
* IBAN
* IP address
* Location
* Medical license number
* Person name
* Phone number
* URL

### **United States**

* Bank account number
* Driver’s license number
* ITIN
* Passport number
* Social Security Number

### **United Kingdom**

* NHS Number
* National Insurance Number

Users can select each category individually or enable **Select All** in the interface.

<img src="https://mintcdn.com/devic/QV7aHWx1B4u4orEN/Mask_pii_options.png?fit=max&auto=format&n=QV7aHWx1B4u4orEN&q=85&s=fb8c034518bc75da483109d59e3618d2" alt="Example of selectable PII categories in Devic" width="1912" height="940" data-path="Mask_pii_options.png" />

***

## When to Use Mask PII

Mask PII is recommended for agents that:

* Process instructions that may contain personal data.
* Operate in regulated environments (GDPR, HIPAA, internal compliance).
* Interact with end users and must avoid storing or forwarding sensitive information.
* Execute automated tasks where data must remain anonymized.

***

## How to Configure It

To enable Mask PII in an agent:

1. Open the agent from the sidebar panel.
2. Click the options menu (⋮) in the upper-right corner.
3. Select **Guardrails**.
4. Click **Add guardrail**.
5. Select **Mask PII**.
6. Choose the entities you want to mask.
7. Save the configuration.

***

<Card title="Next: Moderation" icon="alert-triangle" href="./moderation">
  Learn how to block sensitive or inappropriate content using the Moderation guardrail.
</Card>
