PII Redactor - Detect & Mask Emails, Phones, SSNs, Cards
Pricing
from $2.00 / 1,000 record scanneds
PII Redactor - Detect & Mask Emails, Phones, SSNs, Cards
Redact or pseudonymously mask PII (emails, phones, SSNs, credit cards, IPs, names, addresses) in user-supplied text, CSV, or JSON. Outputs cleaned data plus a redaction log.
Pricing
from $2.00 / 1,000 record scanneds
Rating
0.0
(0)
Developer
Simon Fletcher
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
11 days ago
Last modified
Categories
Share
PII Redactor detects and removes personal data — emails, phone numbers, US Social Security numbers, credit-card numbers, IP addresses, IBANs, and names, organizations & locations — from text, CSV, or JSON that you supply. Names, organizations and locations are found with a real NER model (Microsoft Presidio + spaCy), so it catches genuine names and places rather than matching a fixed wordlist. It returns the cleaned data plus a detailed redaction log (what type of PII was found, where, and how many). It is privacy-positive: it removes personal data, it never scrapes or harvests it.
Set the run memory to at least 2 GB. The NER model (Presidio + spaCy
en_core_web_sm) needs ~1–2 GB of RAM. The Actor ships with a default of 2048 MB; if you lower it in the Apify Console the run may fail to load the model.
Run it in the cloud on the Apify platform with API access, scheduling, and integrations, or call it from an AI agent over the Apify MCP.
What does PII Redactor do?
You give it content you are authorized to process — a support-ticket export, a CSV of form submissions, a JSON log dump, a block of pasted text — and it produces a sanitized copy with every detected piece of PII either:
- redacted — replaced with a type tag such as
[EMAIL_REDACTED], or - masked — replaced with a stable pseudonymous token such as
[EMAIL_3f9a2b1c], where the same value always maps to the same token, so you keep referential integrity (join / group / count on the token) without ever exposing the raw value.
Alongside the cleaned data you get a redaction log that records the PII type, character position, and counts — never the raw value — so you have an auditable trail of what was removed.
What it detects
| Type | Method | Notes |
|---|---|---|
| Email addresses | Presidio built-in | High precision |
| Phone numbers | Presidio built-in (phonenumbers) | North-American + international formats |
| US SSN | Pattern recognizer | Dashed / spaced 123-45-6789 form |
| Credit cards | Presidio built-in + Luhn check | Validated to cut false positives |
| IP addresses | Presidio built-in | IPv4 and IPv6 |
| IBAN | Presidio built-in | International bank account numbers |
| Names / people | NER (Presidio + spaCy) | Real names, e.g. Aleksandr Vovchenko, not just a wordlist |
| Locations / places | NER (Presidio + spaCy) | Cities, countries, regions, e.g. Berlin |
| Organizations | NER (Presidio + spaCy) — opt-in | Company names; excluded from the default set (see below) |
| US postal addresses | Pattern recognizer | e.g. 1600 Pennsylvania Avenue |
Organizations are opt-in. The small NER model over-eagerly tags label words and brands (e.g.
SSN,Visa) as organizations, soorgis left out of the default detection set to keep output high-precision. Addorgto PII types to detect when you specifically want company names removed.
Why use PII Redactor?
- Compliance & data minimization — strip PII from datasets before sharing them with vendors, analysts, or LLM training/eval pipelines (GDPR / CCPA data-minimization).
- Safe AI pipelines — sanitize prompts, logs, and documents before they hit a third-party model.
- Support / CRM exports — clean ticket and chat exports for analytics without leaking customer identities.
- Referential integrity when you need it — mask mode lets you analyze patterns (how many messages per customer) without knowing who the customer is.
- Real NER, not a wordlist — names, organizations, and locations are detected by a Microsoft Presidio + spaCy model, so genuine (including non-English) names and places are caught, not just a fixed list.
- Low maintenance — it processes only data you supply and never touches websites, so nothing breaks when a site changes.
How to use PII Redactor
- Open the Actor and go to the Input tab.
- Choose a Mode:
redact(remove) ormask(stable pseudonymous tokens). - Provide your content one of three ways: paste into Input text, give an Input URL to your own file, or pass an inline Records array.
- (Optional) Restrict PII types to detect, restrict which Fields to scan for CSV/JSON, or set a Mask salt for per-tenant token isolation.
- Click Start and download the cleaned results plus redaction log from the Output tab (JSON, CSV, Excel, or HTML).
Input
| Field | Type | Description |
|---|---|---|
mode | string | redact or mask. Default redact. |
redactionTypes | array | Subset of email, phone, ssn, credit_card, ip, iban, name, location, address, org. Empty = default set (everything except org). |
inputFormat | string | text, csv, or json — how to parse inputText / a fetched file. |
inputText | string | Inline content to clean. |
inputUrl | string | URL to your own text/CSV/JSON file (used only if no inline content). |
records | array | Inline array of strings/objects to clean directly (takes precedence). |
fields | array | For objects, restrict scanning to these field names. |
maskSalt | string | Optional secret salt for pseudonymous tokens in mask mode. |
Input example
{"mode": "redact","inputFormat": "text","inputText": "Reach John Smith at john@acme.com or (212) 555-0147. SSN 078-05-1120."}
Output
One dataset item per non-empty input record. Each item holds the cleaned content plus the redaction log.
{"index": 0,"mode": "redact","redacted": "Reach [NAME_REDACTED] at [EMAIL_REDACTED] or [PHONE_REDACTED]. SSN [SSN_REDACTED].","redactionCount": 4,"redactionsByType": { "name": 1, "email": 1, "phone": 1, "ssn": 1 },"redactions": [{ "type": "name", "start": 6, "end": 16, "replacement": "[NAME_REDACTED]" },{ "type": "email", "start": 20, "end": 33, "replacement": "[EMAIL_REDACTED]" },{ "type": "phone", "start": 37, "end": 51, "replacement": "[PHONE_REDACTED]" },{ "type": "ssn", "start": 57, "end": 68, "replacement": "[SSN_REDACTED]" }]}
For CSV/JSON object records, redacted mirrors the input object with each string field cleaned, and each redaction carries the field it was found in. You can download the dataset in JSON, CSV, Excel, or HTML.
Output fields
| Field | Type | Description |
|---|---|---|
index | integer | Position of the record in your input. |
mode | string | redact or mask. |
redacted | string | object | The cleaned content. |
redactionCount | integer | Total PII instances removed in this record. |
redactionsByType | object | Counts grouped by PII type. |
redactions | array | Per-match log: type, start, end, replacement, and field (for objects). Never contains the raw PII value. |
Pricing / cost estimation
This Actor is billed pay-per-event: you are charged once per non-empty record processed — never for blank rows, non-text values, or failed rows. The engine now runs a spaCy NER model (loaded once per run), so allow ~2 GB of memory and expect modestly higher per-record compute than a pure-regex pass; batching many records into one run amortizes the one-time model-load cost. See PRICING.md for the unit-economics rationale.
Tips & advanced options
- Batch large jobs via the
recordsarray or a CSV/JSONinputUrl— one run cleans thousands of records. - Restrict
redactionTypesto only what you need for higher precision and clearer logs. - Use
maskSaltper customer/tenant so pseudonymous tokens can't be correlated across tenants. maskvsredact: choosemaskwhen downstream analytics must still group/join by the (now anonymous) value; chooseredactwhen you simply want the PII gone.
FAQ, limitations & support
- Does it scrape anything? No. It only processes data you supply (inline, or a URL to your own file). It never harvests personal data.
- Is the raw PII ever stored? No. The redaction log records only the PII type, position, and counts — not the value. In
maskmode the token is a one-way hash. - How accurate is name / organization / location detection? Structured types (email, phone, SSN, credit card, IP, IBAN) are high-precision. Names, organizations, and locations use a Microsoft Presidio + spaCy NER model — far better recall than a wordlist (it catches real, including non-English, names) but still statistical: it can miss lowercase or unusual mentions and occasionally over- or under-tag, especially organizations (which is why
orgis opt-in). The model is the smallen_core_web_sm(chosen to keep the image and memory reasonable). Review the redaction log for sensitive workloads. - Which formats? Plain text, CSV (with header), and JSON (array or object).
- Feedback / bugs? Use the Issues tab. Custom detectors or formats can be added on request.