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

# Redact PII

> Redact personally identifiable information from trace data before it is stored

On LLM projects, you can redact personally identifiable information from
[trace](https://docs.openlayer.com/monitoring/instrument.md) data **before it is stored**. PII redaction
lives in the **Privacy** section on **Project settings → General**.

Changes to these settings, including turning redaction off, are recorded in the
workspace [audit trail](https://docs.openlayer.com/security.md#audit-trail) with the user who made them.

This setting is not the same as the [Contains PII](https://docs.openlayer.com/tests/catalog/contains-p-i-i.md)
test, which detects PII in your data, or [gateway
guardrails](https://docs.openlayer.com/gateway/guardrails.md), which block or redact PII on requests and
responses in real time.

## Turn on PII redaction

PII redaction is available on **LLM projects** only.

1. Open the LLM project.
2. Go to **Settings** → **General**.
3. Find the **Privacy** section: “Control how sensitive data is handled in this
   project.”
4. Turn on **PII redaction**: “Redact personally identifiable information from
   trace data before it is stored.”

When you enable it, Openlayer shows **PII redaction enabled** with “Trace data
will be redacted for the selected entity types.” When you disable it, Openlayer
shows **PII redaction disabled**.

## Choose entity types

With **PII redaction** on, **Entity types to redact** appears. Use the
**Select entity types…** control to choose the entity types to redact. You can
search with **Search entity types…** and select all types at once.

## Set languages

The **Languages** setting applies to both PII redaction and the [Contains
PII](https://docs.openlayer.com/tests/catalog/contains-p-i-i.md) test, even when redaction is off. English is
the default; an empty selection also uses English. Add Dutch for Dutch or mixed
English and Dutch traces.

With Dutch selected, names, locations, and nationalities are flagged only when
English and Dutch detection agree. This reduces false positives in
mixed-language text, but can miss a name that only one language recognizes.
Pattern-based entities such as email addresses, credit cards, and IDs are
unaffected.

## What gets redacted

Openlayer redacts personally identifiable information from trace data
**before it is stored**, for the entity types you select. For object and array
outputs, and JSON encoded inside message content, Openlayer redacts the string
values while preserving the JSON structure.

Redacted stored text cannot be recovered. Set **Languages** to match your traces
before or when you turn on redaction for names, locations, or nationalities.

Use this setting when you want stored traces to omit PII. Use the
[Contains PII](https://docs.openlayer.com/tests/catalog/contains-p-i-i.md) test when you want to measure
whether PII is present. Use [gateway
guardrails](https://docs.openlayer.com/gateway/guardrails.md) when you want to block or redact PII on
traffic before it reaches a provider or a user.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.