Technical overview
PII redaction technical overview
Reviewed 7 October 2026 · Maskflare product team
- 01
Identify sensitive values
- 02
Replace with stable tokens
- 03
Restore only inside your boundary
Coverage
What Maskflare detects
| Data type | How it's detected | Coverage |
|---|---|---|
| Email addresses | Validated address format | Built in |
| Phone numbers | National formats with country context | Built in, 47 country packs |
| Payment cards | Card-number format with Luhn checksum | Built in |
| IBANs and bank accounts | IBAN mod-97 checksum and national account formats | Built in, 47 country packs |
| National, tax, and social security IDs | Country formats with official check digits | 47 country packs |
| Postal addresses | Street-address grammars in 29 languages | Built in |
| Person names | Name lists and context evidence, plus a local named-entity layer for names in free text | Person names pack and named-entity layer |
| Dates of birth | Date formats in 23 languages, next to birth-date context | Built in |
| Health identifiers | NPI, DEA, Medicare MBI, NHS, KVNR, record and member numbers | Healthcare pack |
| API keys and credentials | 232 secret formats, including every provider Maskflare proxies | Credentials pack |
| IP and MAC addresses, device IDs, crypto wallets, VINs | Validated formats and checksums | Built in |
| Web URLs that identify someone | Links carrying record IDs, emails, names or social profiles; every URL with the opt-in strict pack | Built in, strict pack optional |
| Your own identifiers | Custom regex rules, term dictionaries, and Exact Data Match on your records | Configurable |
| Text inside documents | PDF, Word, Excel, PowerPoint, HTML, and e-mail attachments | Optional document scanning |
| Text inside images | Classic OCR on images attached to API requests; matched words blacked out (best effort) | Optional image scanning |
Synthetic examples
Input and transformed output
Three of the seven actions, applied to synthetic data. Tokens are shortened for readability.
AI prompt · mask
Input
Summarize the case for Alex Morgan (alex@example.com), IBAN DE89 3704 0044 0532 0130 00.
Transformed
Summarize the case for mf_mask_1d0c… (mf_mask_7a42…), IBAN mf_mask_c93e….
Application log · redact
Input
password_reset user=alex@example.com ip=203.0.113.42 status=sent
Transformed
password_reset user=[REDACTED] ip=[REDACTED] status=sent
Support transcript · partial
Input
Please call me at +1 202-555-0147 about order MF-10492.
Transformed
Please call me at +* ***-***-0147 about order MF-10492.
Policy actions
What each rule can do with a match
Mask
Replace the value with an mf_mask_ token that can be restored in the response or through the unmask API.
Reversible
Redact
Replace the value with [REDACTED].
Irreversible
Partial
Keep the first or last few characters and star the rest.
Recognition without exposure
Hash
Replace the value with a keyed hash that is stable within your organization.
Joins without the value
Format-preserving encryption
Encrypt letters and digits in place, keeping length and separators.
Reversible, same shape
Alert
Let the value through and count the match.
Monitoring and tuning
Block
Refuse the whole request with a 403 before it reaches the provider.
Prohibited data
Detection methodology
How a request is processed
- 01
Normalize
Decode JSON escapes, fold Unicode look-alikes and invisible characters, and decode base64, hex, and URL-encoded runs.
- 02
Detect
Run validated patterns, checksums, context keywords, dictionaries, and Exact Data Match on the normalized text.
- 03
Resolve
Drop allowlisted values and keep the strongest finding where matches overlap.
- 04
Act
Apply each rule's action. A block rule refuses the request before the provider sees it.
- 05
Restore
If restoration is on for the API key, swap tokens back in the response, streaming included. Record metadata-only counts.
How quality should be measured
Report precision and recall by data type, language, source, and format. Keep tuning samples separate from the final evaluation set, and review transformation quality as well as detection.
How false positives should be handled
Start new rules in alert mode, add allowlist entries for known safe values, and use the console playground to see which rule matched and why a near-miss was rejected. Counts are recorded without the values.
Integration architecture
Place enforcement before the destination
Source
Application, AI agent, employee browser, or data pipeline
Detection
574 built-in detectors, a named-entity layer, your rules, and Exact Data Match
Policy
Per-environment rules: mask, redact, hash, encrypt, alert, or block
Destination
OpenAI, Anthropic, Gemini, Mistral, and 5 more providers
Maskflare reaches traffic three ways: apps (the gateway with one base URL per provider, the Python and TypeScript SDKs, the LiteLLM guardrail), people (the Workforce desktop agent and browser protection for ChatGPT, Claude, Gemini, DeepSeek and Perplexity, or the forward proxy), and agents (MCP tool-call masking and hooks for Claude Code, Cursor and Codex CLI). If masking can't run, each organization chooses whether requests fail closed or go through and are flagged.
Known limitations
Known limits
Context can be ambiguous
Names, addresses, and internal references don't always have a unique format. Context keywords and checksums reduce false positives; allowlists handle known safe values.
Names have no checksum
Person names are found by word lists, context and the local named-entity layer. Test unusual names and spellings from your own documents.
Image text depends on quality
Image scanning uses classic OCR (no AI model) in English, German, French and Italian, for API requests and browser uploads. Handwriting is detected and refused. Very small, blurred or stylized text can still be missed. Files are also stripped of metadata and checked for malware.
Custom identifiers need configuration
Customer, employee, case, and transaction numbers need your own regex rules, dictionaries, or Exact Data Match.
Masking is not a full data-risk review
Confidential business information and sensitive inferences without a recognizable format need their own policy.
Explainable by design
Identifiers and secrets are found by patterns, checksums, word lists and exact matching; names and free-text details by a local named-entity layer that runs inside Maskflare. Every decision is explained in the playground.
Next step
See it on your own data
Bring the providers, data types, and languages your teams use, and we'll run them through Maskflare in a 30-minute demo.