🛡️

Enhanced PII Redactor & Replacer

Detect and redact personally identifiable information — names, emails, phone numbers, addresses — from text.

Enhanced PII Redactor & Replacer

Swap names, emails, phone numbers, IPs, and card numbers for consistent placeholders — before any of it reaches an LLM.

100% Client-Side — Your data never leaves your browser
Detect
Input0 chars · ~0 tokens
Protected Output0 chars · ~0 tokens
0
Entities Found
0
Total Replacements
0%
Token Delta
Dynamic Mapping Registry0 active mappings

No PII detected yet. Mappings will appear here as you type.

How to use the PII Redactor

Paste any text containing personal information into the input panel on the left — a support log, an email thread, a customer record, or a system prompt. The tool scans continuously as you type and writes a protected version into the output panel on the right, ready to copy into an LLM prompt or a shared document.

Every unique person, email, phone number, IP address, or card number is replaced with a consistent placeholder such as [USER_1] or [EMAIL_1]. If the same entity appears five times in your text, all five occurrences become the same placeholder, so an LLM reading the output can still follow who said what without ever seeing a real identity. Toggle Use Realistic Synthetic Replacements to swap real values for plausible fake ones instead of bracketed tokens, and use the category checkboxes to limit detection to only the PII types you care about.

Real-World Applications and Use Cases

Sanitising support tickets for AI triage

Strip customer names, emails, and phone numbers from tickets before pasting them into an LLM for summarisation or categorisation, while keeping every reference to the same customer consistent throughout the conversation.

Sharing logs with a third-party model

Server and application logs often contain IP addresses and embedded contact details. Redact them in one pass before sending logs to an external API for debugging or anomaly detection.

Building anonymised training or demo data

Enable Synthetic Data Mode to turn a real transcript into a realistic-looking but entirely fictional one, useful for product demos, documentation examples, or sharing sample data with vendors.

Pre-flight checks before pasting into ChatGPT or Claude

Run any prompt through the redactor first as a habit-forming privacy check, catching PII you might otherwise paste into a third-party chat interface by accident.

Deep-Dive: Detection, Substitution & Synthetic Data

Pattern-Based Detection Engine

The tool runs a set of browser-native regular expressions over the input on every keystroke (debounced by roughly 200ms to keep typing smooth). Email addresses are matched against an RFC 5322-style pattern, IPv4 and IPv6 addresses use dedicated octet and hextet patterns, phone numbers match common international and local formats, and credit card numbers are matched against Visa, Mastercard, Amex, and Discover digit-length and prefix conventions. Name detection looks for capitalised word pairs in typical name position, which catches most plain-English names without needing a server-side NLP model.

Stateful Substitution Map

Instead of replacing every match with a generic [REDACTED] string, the engine keeps a substitution map in memory for the current session. The first time a unique value is seen it is assigned the next index for its category — the first email becomes [EMAIL_1], the second becomes [EMAIL_2], and so on. Every later occurrence of that exact value, anywhere in the text, is replaced with the same placeholder. This preserves the narrative structure of the original document so a downstream model can still reason about relationships between people, without ever seeing who they actually are.

Synthetic Data Mode

When Use Realistic Synthetic Replacements is enabled, the same substitution map is used, but instead of a bracketed token each unique entity is assigned a deterministic fake value — a realistic name, email, phone number, IP, or card number — generated from a small built-in name and domain bank combined with a seeded pseudo-random generator. The mapping stays one-to-one and consistent: every later instance of john.doe@gmail.com still becomes the same synthetic email throughout the document, even though it now reads as ordinary, harmless-looking text.

Live Token Auditing

Both panels show a live character count and an estimated token count, calculated with a lightweight heuristic of roughly one token per four characters — the same rule of thumb used for quick LLM context-budgeting. The Token Delta stat compares output tokens to input tokens, so you can see at a glance whether redaction meaningfully changed the size of the payload you are about to send.

Memory Hygiene

Clicking Clear All empties both text fields, resets the token counters to zero, and discards the in-memory substitution map entirely, so no trace of the previous session's identifiers remains in the page's JavaScript state.

Frequently Asked Questions

Is any of my text sent to a server?

No. Every regular expression match, every substitution, and the entire mapping registry run inside your browser tab. No network requests are made with your text, and nothing is logged or transmitted anywhere.

Why does the same name always get the same placeholder?

This is the core design goal: an LLM reading your redacted text should still be able to follow which actor did what, even though it never sees a real identity. Replacing every occurrence of "John Doe" with a unique placeholder every time would destroy that narrative thread, so the tool keeps a consistent map for the whole session.

What is Synthetic Data Mode?

Instead of structural placeholders like [USER_1], Synthetic Data Mode swaps each unique piece of PII for a realistic but entirely fake equivalent — a plausible name, email, phone number, or address. Consistency is preserved exactly the same way: one real entity always maps to the same fake one.

Will it catch every name or phone number?

Pattern-based detection cannot achieve perfect recall — unusual name formats, informally written numbers, or context-only references may be missed. Always review the output before sharing it externally, especially for highly sensitive documents.

What happens when I click Clear All?

The input and output fields are emptied, the token counters reset to zero, and the substitution map held in memory is discarded completely, so no identifiers from the previous session persist in the page.

Can I choose which categories of PII to detect?

Yes. Use the category checkboxes above the editor to turn detection for names, emails, phone numbers, IP addresses, or credit card numbers on or off individually.

Disclaimer: This tool uses pattern-based heuristics and cannot guarantee complete detection of every form of personal information. It is a helpful pre-flight check, not a substitute for a full data protection or compliance review of sensitive documents.
piiredactprivacyanonymizesynthetic datallmpromptdata maskinggdprsecurity

More Tools You Might Like

🤖Cross-Model Prompt Architect & Tokenizer
⛓️Prompt Chain Builder (Chain-of-Thought)
🔎AI Hallucination & Fact-Check Guard
📐Structured Data AI Formatter (JSON-LD)
🛡️System Prompt Safety Stress-Tester
🎯AI Brand Voice Alignment Gauge