---
title: "GDPR Personal Data Redaction"
description: "Stop sending sensitive data to third-party APIs. Philterd ships open source PII and PHI redaction that runs inside your cloud. For HIPAA, GDPR, and CCPA work."
url: "https://philterd.ai/policies/general/gdpr-personal-data/"
---

[← All policies](https://philterd.ai/policies/)

General · Philterd

# GDPR Personal Data Redaction

Redact personal data and special-category data as defined by the EU General Data Protection Regulation (GDPR) from documents and records.

[View policy →](https://philterd.ai/policies/general/gdpr-personal-data/#policy-json) [Download JSON →](https://raw.githubusercontent.com/philterd/pii-redaction-policies/main/policies/philterd/general/gdpr-personal-data.json) [View source on GitHub](https://github.com/philterd/pii-redaction-policies/blob/main/policies/philterd/general/gdpr-personal-data.md)

**v2.0.0** Updated 2026-10-26 Philter `>=4.0.0` By Philterd

GDPR EU personal data data protection Article 4 Article 9 privacy

## The policy

The full `gdpr-personal-data.json` file. The same content you’d get by downloading. Copy any part of it, or use the buttons in the hero to grab the whole file.

```
{
  "config": {
    "splitting": {
      "enabled": false,
      "threshold": 4000
    }
  },
  "ignored": [],
  "identifiers": {
    "person": {
      "phEyeConfiguration": {
        "modelPath": "ph-eye-pii-en-small",
        "labels": [
          "name"
        ]
      },
      "phEyeFilterStrategies": [
        {
          "strategy": "REDACT",
          "redactionFormat": "{{{REDACTED-%t}}}",
          "condition": "confidence > 0.70"
        }
      ]
    },
    "date": {
      "onlyValidDates": true,
      "dateFilterStrategies": [
        {
          "strategy": "TRUNCATE_TO_YEAR",
          "condition": "context == \"birth\""
        }
      ]
    },
    "emailAddress": {
      "emailAddressFilterStrategies": [
        {
          "strategy": "REDACT",
          "redactionFormat": "{{{REDACTED-%t}}}"
        }
      ]
    },
    "phoneNumber": {
      "phoneNumberFilterStrategies": [
        {
          "strategy": "REDACT",
          "redactionFormat": "{{{REDACTED-%t}}}"
        }
      ]
    },
    "streetAddress": {
      "streetAddressFilterStrategies": [
        {
          "strategy": "REDACT",
          "redactionFormat": "{{{REDACTED-%t}}}"
        }
      ]
    },
    "ipAddress": {
      "ipAddressFilterStrategies": [
        {
          "strategy": "REDACT",
          "redactionFormat": "{{{REDACTED-%t}}}"
        }
      ]
    },
    "macAddress": {
      "macAddressFilterStrategies": [
        {
          "strategy": "REDACT",
          "redactionFormat": "{{{REDACTED-%t}}}"
        }
      ]
    },
    "ibanCode": {
      "ibanCodeFilterStrategies": [
        {
          "strategy": "MASK",
          "maskCharacter": "*",
          "maskLength": "SAME",
          "leaveCharacters": 4
        }
      ]
    },
    "creditCard": {
      "onlyValidCreditCardNumbers": true,
      "creditCardFilterStrategies": [
        {
          "strategy": "MASK",
          "maskCharacter": "*",
          "maskLength": "SAME",
          "leaveCharacters": 4
        }
      ]
    },
    "passportNumber": {
      "passportNumberFilterStrategies": [
        {
          "strategy": "REDACT",
          "redactionFormat": "{{{REDACTED-%t}}}"
        }
      ]
    },
    "driversLicense": {
      "driversLicenseFilterStrategies": [
        {
          "strategy": "REDACT",
          "redactionFormat": "{{{REDACTED-%t}}}"
        }
      ]
    },
    "url": {
      "urlFilterStrategies": [
        {
          "strategy": "REDACT",
          "redactionFormat": "{{{REDACTED-%t}}}"
        }
      ]
    },
    "identifiers": [
      {
        "classification": "national-id",
        "pattern": "\\b(?:national insurance|NI|NINO|personnummer|BSN|NIF|NIE|codice fiscale|tax(?:payer)? id|TIN)[\\s:#]*[A-Z0-9][A-Z0-9 -]{5,}\\b",
        "caseSensitive": false,
        "identifierFilterStrategies": [
          {
            "strategy": "REDACT",
            "redactionFormat": "{{{REDACTED-NATIONAL-ID}}}"
          }
        ]
      },
      {
        "classification": "vat-number",
        "pattern": "\\b(?:VAT|VAT(?:IN|No))[\\s:#]*[A-Z]{2}[0-9A-Z]{2,12}\\b",
        "caseSensitive": false,
        "identifierFilterStrategies": [
          {
            "strategy": "REDACT",
            "redactionFormat": "{{{REDACTED-VAT}}}"
          }
        ]
      }
    ]
  }
}
```

## Example

Input

```
Data subject Anna Müller (DOB 1985-04-12) lives at Hauptstraße 5, Berlin. Email anna.mueller@example.de, phone +49 30 123456. IBAN DE89370400440532013000. National Insurance NINO QQ123456C. Diagnosed with asthma.
```

Output

```
Data subject {{{REDACTED-name}}} (DOB 1985-04-12) lives at Hauptstraße 5, Berlin. Email {{{REDACTED-email-address}}}, phone {{{REDACTED-phone-number}}}. IBAN **********************. {{{REDACTED-NATIONAL-ID}}}. Diagnosed with asthma.
```

## Entities this policy acts on

NAME DATE EMAIL PHONE ADDRESS IP MAC IBAN CREDIT\_CARD PASSPORT LICENSE URL NATIONAL\_ID VAT

## What this policy does

Removes **personal data** — any information relating to an identified or identifiable natural person under [Article 4(1) of the GDPR](https://gdpr-info.eu/art-4-gdpr/) — from documents and records, with extra attention to the **special categories of personal data** in [Article 9](https://gdpr-info.eu/art-9-gdpr/) (which includes health data). Health data is not detected automatically: see *Special categories* below.

The GDPR’s definition of personal data is deliberately broad. It explicitly names online identifiers (IP addresses, device identifiers) alongside the traditional direct identifiers. This policy targets:

- **Names** — redacted (confidence-gated)
- **Birthdates** — truncated to year only when context indicates a birth date; other dates pass through
- **Email, phone, postal address** — redacted
- **IP addresses and MAC addresses** — redacted as Article 4 online identifiers
- **IBANs and credit card numbers** — masked to last 4 visible
- **Passport and driver’s licence numbers** — redacted
- **URLs** — redacted (may carry identifiers in query strings)
- **National identification numbers** (NINO, BSN, personnummer, NIF/NIE, codice fiscale, TIN) — redacted
- **VAT numbers** — redacted

## When to use this

- **Transferring records to a processor or third country** where a Data Processing Agreement requires minimising identifiable data
- **Responding to a Subject Access Request (SAR)** where third parties’ personal data must be redacted from the disclosed copy
- **Sharing data for analytics or research** under the GDPR’s data-minimisation principle ([Article 5(1)(c)](https://gdpr-info.eu/art-5-gdpr/))
- **Pseudonymisation workflows** ([Article 4(5)](https://gdpr-info.eu/art-4-gdpr/)) where direct identifiers are stripped before further processing
- **Training or fine-tuning models** on data that originated in the EU/EEA

## When to customize

- **National ID formats.** The default `national-id` pattern is keyword-anchored and intentionally broad to span member states. For a single jurisdiction, replace it with that country’s exact format (e.g. a precise UK NINO or Dutch BSN regex) to reduce false positives and negatives.
- **Name confidence threshold.** Default redacts names above confidence 0.70. Lower it for higher recall (more aggressive redaction), raise it for higher precision.
- **Date of birth.** Default truncates to year on birth context. For full pseudonymisation switch to `REDACT`; for age-band research, year is usually sufficient.
- **Special categories.** Article 9 also covers racial/ethnic origin, political opinions, religious beliefs, trade-union membership, genetic and biometric data, and sexual orientation. None of these, including health data, is detected automatically here. Add custom identifiers or dictionaries, such as a list of condition names, for the categories your documents contain.
- **Pseudonymisation vs anonymisation.** Redaction alone may still leave indirectly-identifying data. True anonymisation (data outside GDPR scope) requires assessing re-identification risk across the whole record, not just removing these fields.

## Compliance notes

- **Regulation (EU) 2016/679 (GDPR)** — in force since 25 May 2018
- **Article 4** defines personal data, pseudonymisation, and online identifiers
- **Article 5** sets the data-minimisation and storage-limitation principles this policy supports
- **Article 9** governs special categories of personal data (add detection for the categories your documents contain)
- **UK GDPR + Data Protection Act 2018** mirror these definitions for the United Kingdom post-Brexit; this policy applies equally as a baseline
- This policy is a **baseline starting point**, not a determination of lawful basis, and does not by itself achieve anonymisation under [Recital 26](https://gdpr-info.eu/recitals/no-26/). Always assess re-identification risk for your specific dataset.

## References

- [GDPR full text (gdpr-info.eu)](https://gdpr-info.eu/)
- [Article 4 — Definitions](https://gdpr-info.eu/art-4-gdpr/)
- [Article 9 — Special categories of personal data](https://gdpr-info.eu/art-9-gdpr/)
- [EDPB guidance on pseudonymisation and anonymisation](https://www.edpb.europa.eu/our-work-tools/general-guidance/guidelines-recommendations-best-practices_en)

## Using this policy with Phileas

The name filter names `ph-eye-pii-en-small`, the model bundled with Philter 4.0. With Phileas, set its `modelPath` to the directory of a downloaded copy of the model, [philterd/ph-eye-pii-en-small](https://huggingface.co/philterd/ph-eye-pii-en-small).

## Use this policy

Download and load into your running Philter instance:

```
# Download the policy
curl -O https://raw.githubusercontent.com/philterd/pii-redaction-policies/main/policies/philterd/general/gdpr-personal-data.json

# Upload it to Philter as gdpr-personal-data
curl -sk -X POST "https://localhost:8080/api/policies?name=gdpr-personal-data" \
     -H "Authorization: Bearer $PHILTER_API_KEY" \
     -H "Content-Type: application/json" \
     --data @gdpr-personal-data.json

# Redact text with it
curl -sk "https://localhost:8080/api/filter?p=gdpr-personal-data" \
     -H "Authorization: Bearer $PHILTER_API_KEY" \
     -H "Content-Type: text/plain" \
     --data-binary "your text here"
```

For Philter 4.0. No Philter instance yet? The [quick start](https://philterd.ai/dev/start/) runs one and shows where `PHILTER_API_KEY` comes from · Want to tune this policy against your data? [Talk to the team](https://philterd.ai/policies/general/gdpr-personal-data/#).

[← All policies](https://philterd.ai/policies/)
