Talk to the Team

Tell us about your stack and the privacy problems you're trying to solve. We typically respond within one business day.

Prefer email? support@philterd.ai

Prefer to skip the form? Pick a time on our calendar →
or send a message

Please do not enter PII or PHI in this form. If you need to share an example, use a sanitized one.

← All policies

General · Philterd

German Identifiers (Steuer-ID, Personalausweis)

Redact German tax identification numbers (Steuer-ID / IdNr) and national ID card numbers (Personalausweis), validated by their check digits.

v1.0.0 Updated 2026-06-15 Philter Requires Phileas 4.1.0+ (redaction policy schema 1.1.0 with the de-steuerid and de-personalausweis validators) By Philterd
GermanySteuer-IDIdNrPersonalausweisnational IDtax ID

The policy

The full german-identifiers.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": {
    "identifiers": [
      {
        "classification": "german-steuer-id",
        "pattern": "\\b\\d{11}\\b",
        "caseSensitive": false,
        "validator": "de-steuerid",
        "identifierFilterStrategies": [
          {
            "strategy": "REDACT",
            "redactionFormat": "[REDACTED-GERMAN-STEUER-ID]"
          }
        ]
      },
      {
        "classification": "german-personalausweis",
        "pattern": "\\b[A-Z]\\d{9}\\b",
        "caseSensitive": false,
        "validator": "de-personalausweis",
        "identifierFilterStrategies": [
          {
            "strategy": "REDACT",
            "redactionFormat": "[REDACTED-GERMAN-PERSONALAUSWEIS]"
          }
        ]
      }
    ]
  }
}

Example

Input

Steuer-ID 86095742719 and Ausweisnummer T220001293 on file.

Output

Steuer-ID [REDACTED-GERMAN-STEUER-ID] and Ausweisnummer [REDACTED-GERMAN-PERSONALAUSWEIS] on file.

Entities this policy acts on

GERMAN_STEUER_IDGERMAN_PERSONALAUSWEIS

What this policy does

Detects and redacts two German personal identifiers using Phileas’s generic identifier filter with a check-digit validator, so each match is kept only if its checksum is valid:

  • Steuer-ID (Steuerliche Identifikationsnummer, “IdNr”): the 11-digit tax identification number, validated by the de-steuerid validator (the structural digit-repetition rule plus the ISO/IEC 7064 MOD 11,10 check digit).
  • Personalausweis: the 10-character national ID card number, validated by the de-personalausweis validator (the ICAO 9303 7-3-1 check digit).

Each is replaced with a distinct token ([REDACTED-GERMAN-STEUER-ID], [REDACTED-GERMAN-PERSONALAUSWEIS]).

Why the validators matter

The patterns alone (eleven digits, or a letter followed by nine digits) would over-match ordinary numbers. The validator keeps a match only if the check digit is correct, so a value such as 86095742718 (a Steuer-ID shape with a wrong check digit) is left in place while the valid 86095742719 is redacted. Detection is still probabilistic: a wrong-but-checksum-valid value can pass, so validate against your own documents.

Test vectors

  • Steuer-ID, valid: 86095742719. Invalid (bad check digit): 86095742718.
  • Personalausweis, valid: T220001293. Invalid (bad check digit): T220001294.

Contextual cues

In free text where bare numbers are common, anchor on a nearby cue and capture only the identifier with groupNumber. For example, require “Steuer-ID”, “IdNr”, or “Ausweisnummer” before the value:

{
  "classification": "german-steuer-id",
  "pattern": "(?:Steuer-?ID|IdNr)[\\s:#-]*(\\d{11})",
  "caseSensitive": false,
  "groupNumber": 1,
  "validator": "de-steuerid",
  "identifierFilterStrategies": [
    { "strategy": "REDACT", "redactionFormat": "[REDACTED-GERMAN-STEUER-ID]" }
  ]
}

This trades recall (bare identifiers with no nearby cue are missed) for precision.

Prerequisites

Use Phileas 4.1.0 or later, which provides redaction policy schema 1.1.0 and the de-steuerid and de-personalausweis validators. On an older build the validator field is not applied. The example input and output were verified against Phileas 4.1.0.

References

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/german-identifiers.json

# Upload to your Philter instance
curl -X POST http://localhost:8080/api/policies \
     -H "Content-Type: application/json" \
     --data @german-identifiers.json

# Redact text using the policy
curl http://localhost:8080/api/filter?p=german-identifiers \
     --data "your text here" \
     -H "Content-Type: text/plain"

No Philter instance yet? Deploy one in 5 minutes → · Want to tune this policy against your data? Talk to the team.