PII Redactor - Detect & Mask Emails, Phones, SSNs, Cards avatar

PII Redactor - Detect & Mask Emails, Phones, SSNs, Cards

Pricing

from $2.00 / 1,000 record scanneds

Go to Apify Store
PII Redactor - Detect & Mask Emails, Phones, SSNs, Cards

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

Simon Fletcher

Maintained by Community

Actor 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

TypeMethodNotes
Email addressesPresidio built-inHigh precision
Phone numbersPresidio built-in (phonenumbers)North-American + international formats
US SSNPattern recognizerDashed / spaced 123-45-6789 form
Credit cardsPresidio built-in + Luhn checkValidated to cut false positives
IP addressesPresidio built-inIPv4 and IPv6
IBANPresidio built-inInternational bank account numbers
Names / peopleNER (Presidio + spaCy)Real names, e.g. Aleksandr Vovchenko, not just a wordlist
Locations / placesNER (Presidio + spaCy)Cities, countries, regions, e.g. Berlin
OrganizationsNER (Presidio + spaCy) — opt-inCompany names; excluded from the default set (see below)
US postal addressesPattern recognizere.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, so org is left out of the default detection set to keep output high-precision. Add org to 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

  1. Open the Actor and go to the Input tab.
  2. Choose a Mode: redact (remove) or mask (stable pseudonymous tokens).
  3. 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.
  4. (Optional) Restrict PII types to detect, restrict which Fields to scan for CSV/JSON, or set a Mask salt for per-tenant token isolation.
  5. Click Start and download the cleaned results plus redaction log from the Output tab (JSON, CSV, Excel, or HTML).

Input

FieldTypeDescription
modestringredact or mask. Default redact.
redactionTypesarraySubset of email, phone, ssn, credit_card, ip, iban, name, location, address, org. Empty = default set (everything except org).
inputFormatstringtext, csv, or json — how to parse inputText / a fetched file.
inputTextstringInline content to clean.
inputUrlstringURL to your own text/CSV/JSON file (used only if no inline content).
recordsarrayInline array of strings/objects to clean directly (takes precedence).
fieldsarrayFor objects, restrict scanning to these field names.
maskSaltstringOptional 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

FieldTypeDescription
indexintegerPosition of the record in your input.
modestringredact or mask.
redactedstring | objectThe cleaned content.
redactionCountintegerTotal PII instances removed in this record.
redactionsByTypeobjectCounts grouped by PII type.
redactionsarrayPer-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 records array or a CSV/JSON inputUrl — one run cleans thousands of records.
  • Restrict redactionTypes to only what you need for higher precision and clearer logs.
  • Use maskSalt per customer/tenant so pseudonymous tokens can't be correlated across tenants.
  • mask vs redact: choose mask when downstream analytics must still group/join by the (now anonymous) value; choose redact when 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 mask mode 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 org is opt-in). The model is the small en_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.