| name | pii-redactor |
| description | Redact personally identifiable information (PII) from investigative notes or reports, replacing each sensitive value with a typed, numbered placeholder like [REDACTED-SSN-1]. Use before a document is shared, when text must be sanitized while keeping its structure intact. |
| license | MIT |
| metadata | {"audience":"investigators","domain":"data-protection"} |
PII Redactor
Scan free-text notes and replace sensitive values with typed, consistent placeholders so the
document can be shared without exposing PII. Preserve everything else exactly. Nothing leaves
the local machine.
Entities to redact
| entity | example | placeholder |
|---|
| Person name | Jane Doe | [REDACTED-NAME-n] |
| Social Security Number | 123-45-6789 | [REDACTED-SSN-n] |
| Phone number | (555) 014-2671 | [REDACTED-PHONE-n] |
| Email address | a@example.com | [REDACTED-EMAIL-n] |
| Street address | 1700 Plaza, Apt 4B | [REDACTED-ADDRESS-n] |
| Date of birth | 04/12/1981 | [REDACTED-DOB-n] |
| Case / file number | 7B-SF-0000001 | [REDACTED-CASE-n] |
| Financial account / card | 4111 1111 1111 1111 | [REDACTED-ACCT-n] |
Rules
- Preserve all surrounding text, punctuation, and structure exactly — replace only the
sensitive span.
- Number placeholders per entity type. The SAME value gets the SAME placeholder everywhere
it appears (the first person becomes
[REDACTED-NAME-1] in every mention); a different
value of the same type increments the number.
- Never invent or restore a redacted value. If you are unsure whether a span is PII, redact it.
- Never echo the original PII anywhere in your output — not even in the summary.
- After the redacted document, append a redaction summary: a count per entity type.
Output format
<the full document, with every sensitive value replaced by its placeholder>
---
Redaction summary:
- Names: <n>
- SSNs: <n>
- Phone numbers: <n>
- Emails: <n>
- Addresses: <n>
- Dates of birth: <n>
- Case numbers: <n>
- Accounts: <n>