PII Redactor β Mask & Restore Text Before the LLM
Pricing
from $0.001 / text redacted
PII Redactor β Mask & Restore Text Before the LLM
Detect and mask PII (emails, phones, credit cards, SSNs, IPs, IBANs, URLs) in text before it reaches an LLM, with a reversible token map to restore it afterwards.
Pricing
from $0.001 / text redacted
Rating
0.0
(0)
Developer
Hipersoft
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
6 days ago
Last modified
Categories
Features
Share
PII Redactor β Mask Before the LLM (Reversible)
Strip emails, phone numbers, credit cards and other personal data out of your text before it reaches an AI model β then restore it afterwards with a reversible token map. GDPR-friendly redaction for AI, automation and analytics pipelines.

What it does
- Detects and masks PII β email addresses, phone numbers, credit card numbers, US SSNs, IP addresses, IBANs and URLs.
- Reversible tokens β each value becomes a typed token like
[EMAIL_1]or[CREDITCARD_1], so the text stays readable and the structure survives. - One combined token map β a single reversible map (token β original value) is written to the run's key-value store, so a later step can put the real values back.
- Two modes β
mask(sequential typed tokens) orhash(typed tokens with a stable hash). - Privacy by default β the original text is never stored or logged unless you explicitly opt in.
Use cases
- Mask before the LLM β redact prompts before an AI node (OpenAI, Anthropic, etc.), then restore names, emails and numbers in the model's output. Keep raw PII out of third-party models.
- n8n / Make / Zapier flows β drop it in as a step: redact before the AI node, restore after. Great for support-ticket, email and document automations.
- GDPR-friendly logging & analytics β scrub personal data out of text before it lands in logs, datasets or a warehouse.
- Safe sharing β clean transcripts, tickets and messages before handing them to a vendor or teammate.
Input
{"text": "Contact John at john@acme.com or +1 415 555 0132, card 4111 1111 1111 1111","types": ["email", "phone", "creditcard", "ssn", "ip", "iban", "url"],"mode": "mask","includeOriginal": false}
| Field | Type | Description |
|---|---|---|
text | string | A single block of text to redact. |
items | array | An array of strings to redact in bulk (one result row each). |
types | array | Which PII to catch: email, phone, creditcard, ssn, ip, iban, url. |
mode | string | mask (tokens like [EMAIL_1]) or hash (tokens with a stable hash). |
includeOriginal | boolean | Include the original text in each row. Off by default. |
Provide text, items, or both.
Output

Each row is one redacted input:
{"ok": true,"redacted": "Contact John at [EMAIL_1] or [PHONE_1], card [CREDITCARD_1]","replacements": [{ "type": "email", "token": "[EMAIL_1]", "value": "john@acme.com" },{ "type": "phone", "token": "[PHONE_1]", "value": "+1 415 555 0132" },{ "type": "creditcard", "token": "[CREDITCARD_1]", "value": "4111 1111 1111 1111" }],"counts": { "email": 1, "phone": 1, "creditcard": 1 },"totalReplacements": 3}
A combined reversible token map is also saved to the run's default key-value store under token-map.json ({ "map": { "[EMAIL_1]": "john@acme.com", ... } }) so a downstream step can restore the originals.
Output schema
| Field | Type | Description |
|---|---|---|
redacted | string | The text with PII replaced by tokens. |
replacements | array | Each masked value: type, token and original value. |
counts | object | Number of matches per PII type. |
totalReplacements | integer | Total number of masked values in this item. |
original | string | The original text (only when includeOriginal is on). |
Related Actors
Explore more data tools from the same author:
- PDF to Text & Markdown β Bulk (RAG-ready)
- PDF Watermark β Stamp Text or Image
- Text Stats β Word, Character & Reading-Time Counter
- Barcode Generator β EAN, UPC & Code128
Plug the results straight into your stack with Make, Zapier or any of Apify's integrations.
FAQ
Does it call an AI model or any external service? No. Detection is local pattern-matching with light validation (for example a Luhn check on card numbers) β nothing leaves the run.
How do I restore the original values? Use the token-map.json map (token β value) from the key-value store, or the per-row replacements, to swap the tokens back after your AI or automation step.
Can I automate it? Yes β via integrations on the Apify platform (n8n, Make, Zapier and more) and the Apify API.
Notes
Original clean-room implementation.

