100% Client-Side: Your files and tokens never leave your browser.

PII Anonymizer & Sensitive Data Sanitizer

Remove personal information, secrets and sensitive identifiers entirely in your browser. Nothing is ever uploaded.

All processing occurs locally inside your browser. No content is transmitted to any server.
Total Redacted
0
0 unique values
Emails Found
0
IPs Found
0
JWTs Found
0
UUIDs Found
0
Paste text, JSON, CSV, or click a sample preset above to inspect the side-by-side redaction diff.
What We Detect

Supported Detection Types

All detection rules run deterministically in your browser with consistent document-wide mapping and zero external API calls.

  • Email Addresses
  • Phone Numbers
  • Physical Addresses & Postcodes
  • Dates of Birth
  • IPv4 & IPv6 Addresses
  • URLs, Hostnames & Domains
  • MAC Addresses
  • JWT Tokens
  • Bearer & OAuth Tokens
  • API Keys
  • AWS Credentials
  • GitHub Tokens
  • PEM Private Keys
  • X.509 Certificates
  • UUIDs & GUIDs
  • Customer, Account & Session IDs
  • Credit Card Numbers (Luhn)
  • IBAN, Sort Codes & Bank Accounts
  • NHS Numbers (Modulus 11)
  • National Insurance Numbers
  • Passport Numbers
  • Custom Regex Rules

How Client-Side PII Detection, Consistency & Pseudonymization Work

Before sharing production API payloads, application logs, CSV extracts, or customer support tickets in Slack, Jira, GitHub issues, or LLM prompts, engineers must strip personally identifiable information (PII) and security credentials. Doing this manually with find-and-replace is error-prone and frequently misses nested JWTs, IPv4/IPv6 addresses, UK National Insurance numbers, or Luhn-valid payment card numbers.

DevPayload's PII Anonymizer & Sensitive Data Sanitizer runs a deterministic, priority-ordered detection pipeline strictly inside your browser memory. High-specificity secrets—such as PEM private keys, X.509 certificates, JWTs, AWS access keys, and GitHub tokens—are matched first so they are never partially shredded by lower-priority domain or number rules. Checksum validators (Luhn for credit cards and UK Modulus 11 for 10-digit NHS numbers) drastically reduce false positives on ordinary IDs and timestamps.

Critically, the sanitizer enforces referential consistency across the entire document: every occurrence of the same email, IP address, UUID, or custom entity maps to the exact same placeholder (EMAIL_001), structure-preserving synthetic value ([email protected]), or deterministic SHA-256 hash. This preserves relational join keys and log correlation chains while completely removing sensitive values. The engine is also architected around a pluggable PiiDetectorProvider interface so optional client-side Local AI NER models (WebLLM, transformers.js, or ONNX Runtime Web) can be added without any backend infrastructure.

Priority-Ordered Detection & Consistent Mapping Pipeline

Every detected span is resolved by priority (multi-line PEM keys and JWTs before domains/numbers), filtered against ignored fields, and mapped deterministically across the entire document.

1. Providers: [RegexPiiProvider(v1), CustomRegexRules, ...ExtraProviders (Local AI NER hook)]
2. Overlap Resolution: sort by (priority DESC, spanLength DESC, start ASC)
3. Consistency Key:   mapKey = EntityType + "::" + (caseSensitive ? value : value.toLowerCase())
4. Replacement Modes:
   - Placeholder:        EMAIL_001, IPV4_001, JWT_001
   - Preserve Structure: [email protected], 10.10.10.10
   - SHA-256 Hash:       EMAIL_SHA256_<first-16-hex-of-SHA256(value)>

Code Equivalents (Python & JavaScript / Node.js)

Python Consistent placeholder pseudonymization in Python
import re

EMAIL_RE = re.compile(r"\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b")
IPV4_RE = re.compile(r"\b(?:\d{1,3}\.){3}\d{1,3}\b")

def anonymize_text(text: str) -> tuple[str, dict[str, str]]:
    mapping: dict[str, str] = {}
    counters = {"EMAIL": 0, "IPV4": 0}

    def replace(kind: str):
        def _sub(match: re.Match) -> str:
            raw = match.group(0)
            key = f"{kind}::{raw.lower()}"
            if key not in mapping:
                counters[kind] += 1
                mapping[key] = f"{kind}_{counters[kind]:03d}"
            return mapping[key]
        return _sub

    text = EMAIL_RE.sub(replace("EMAIL"), text)
    text = IPV4_RE.sub(replace("IPV4"), text)
    return text, mapping
JavaScript Deterministic SHA-256 redaction in Node.js
import crypto from 'node:crypto';

const EMAIL_RE = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;

export function hashEmails(input) {
  const seen = new Map();
  return input.replace(EMAIL_RE, (email) => {
    const key = email.toLowerCase();
    if (!seen.has(key)) {
      const digest = crypto.createHash('sha256').update(email).digest('hex').slice(0, 16);
      seen.set(key, `EMAIL_SHA256_${digest}`);
    }
    return seen.get(key);
  });
}

Frequently Asked Questions

Is my JSON, CSV, or log file ever uploaded to a server? +

Never. All pattern detection, SHA-256 hashing, diff generation, and file exports run 100% locally inside your browser memory. Nothing is transmitted to any backend server.

How does consistent entity mapping preserve log debugging? +

Within a single document, identical values always receive the same replacement token (e.g., every occurrence of [email protected] becomes EMAIL_001, and every occurrence of 192.168.1.10 becomes IPV4_001). You can still trace a user session across 500 log lines without exposing their real email or IP.

When should I choose Preserve Structure vs. Generic Placeholders vs. SHA-256? +

Use Generic Placeholders (EMAIL_001) for human-readable tickets and LLM prompts; use Preserve Structure ([email protected], 10.10.10.10) when downstream JSON/CSV parsers or schema validators require valid email/IP/UUID syntax; use SHA-256 hashing when you need deterministic cross-file correlation.

Can I keep specific JSON keys or CSV columns untouched? +

Yes. Open Advanced Options and enter comma-separated field names (such as request_id, service, or host) under "Ignore Selected Fields" to exclude those JSON keys, CSV columns, or key=value log fields from redaction.