PII Detector & Anonymizer
Detect and anonymize personally identifiable information in text. Finds emails, phone numbers, SSNs, credit cards, IPs, IBANs, and more — fully client-side with zero data transmission.
How to Use
Scan text for personal data in three steps:
- Paste your text — Enter logs, customer records, documents, or any text that might contain personal information. Click a sample button to try a pre-loaded example.
- Configure detection — Toggle individual PII categories on or off. Choose an anonymization mode: Mask (partial obscuring), Redact (block characters), or Label (category tags like [EMAIL]).
- Scan and review — Click "Scan for PII" to detect all matches. Review the risk assessment, category breakdown, highlighted original text, and anonymized output. Copy the sanitized text with the clipboard button.
About This Tool
Pattern-Based Detection
The detector uses regular expressions with validation logic to identify 10 categories of structured PII. Each pattern is tuned for precision over recall — it avoids false positives by applying secondary validation. Credit card numbers are verified with the Luhn algorithm (ISO/IEC 7812-1). Social Security Numbers are checked against IRS formatting rules (no 000/666/9xx area codes, no 00 groups, no 0000 serials). IBANs are validated for length and country code format per ISO 13616.
Phone number detection handles US formats (with or without country code, parenthesized area codes, dots/dashes/spaces) and international formats starting with +. Email detection follows RFC 5322 simplified patterns. IPv4 validation ensures each octet is 0-255. Date detection matches common formats (MM/DD/YYYY, DD-MM-YYYY, YYYY-MM-DD) with basic range checking.
Anonymization Modes
Mask mode preserves enough structure for the text to remain readable — email domains show first letters, phone numbers show area code and last four digits, credit cards show last four digits. This is useful for debugging and data sharing where context matters but specific values must be hidden. Redact mode replaces all PII with block characters (█), ensuring zero data leakage. Label mode substitutes category tags like [EMAIL], [SSN], [CREDIT CARD], which is ideal for annotation and training data preparation.
Limitations
Regex-based detection catches structured PII — data that follows predictable formatting patterns. It cannot detect unstructured PII such as person names ("John Smith"), physical addresses ("123 Elm Street"), or medical information. For those, NLP-based named entity recognition (NER) is required. The tool also focuses on English-language patterns; international ID formats beyond IBANs are not covered. For comprehensive data protection compliance, combine automated scanning with manual review. For password security, see Password Generator and Password Strength Tester.
Why Use This Tool
Instant Client-Side Scanning
All detection runs in your browser with zero network calls. This is critical for PII scanning — you should never send personal data to a third-party server just to check if it contains personal data. The regex patterns are embedded in the page code (~3KB). Processing is instantaneous for documents of any practical length.
Common Use Cases
- Log sanitization: Clean server logs, error reports, and debug output before sharing with vendors, posting to Stack Overflow, or attaching to bug reports.
- Document review: Scan contracts, spreadsheet exports, and customer correspondence before forwarding to ensure no SSNs, credit cards, or other sensitive data slip through.
- Data pipeline QA: Verify that ETL pipelines and data exports have properly anonymized personal information before loading into analytics systems.
- Compliance pre-check: Quickly assess PII exposure in text before a formal GDPR, CCPA, or HIPAA audit. The risk score provides a severity triage.
- Training data preparation: Use Label mode to annotate text with PII category tags for building machine learning training datasets.
Privacy
100% client-side. Your text never leaves your browser. Related security tools: AES Encrypt/Decrypt, String Obfuscator, File Checksum, and Secure Notes.