Data Tool

Data Anonymizer

Detect and strip personally identifiable information from text data. Replace emails, phone numbers, SSNs, credit cards, names, and addresses with consistent fake values.

Get the CLI Tool

Run the data anonymizer locally as an MCP server, or try it online below.

npx @clinetools/anonymizer
Requires Node.js 18+
  • 9 PII types — emails, phones, SSNs, credit cards, IPs, names, addresses, DOBs, auth URLs
  • Consistent replacement — same input value always maps to the same fake output
  • Two modes — "fake" for realistic replacements or "redact" for XXX markers
  • Selective detection — choose which PII types to scan for
  • Zero config — just run with npx and start anonymizing

How to Use It

Three ways to anonymize PII — pick the one that fits your workflow.

1

Try Online

Use the interactive demo below to paste data and strip PII — no install needed.

2

Use via CLI

Run as a local MCP server and connect any MCP-compatible client.

npx @clinetools/anonymizer
3

Add to Cline / Claude Code

Add the tool to your MCP settings for instant access from your AI assistant.

"anonymizer": { "command": "npx", "args": ["@clinetools/anonymizer"] }

MCP Client Configuration

{
  "mcpServers": {
    "anonymizer": {
      "command": "npx",
      "args": ["@clinetools/anonymizer"]
    }
  }
}

Example: anonymize_data — fake mode (default)

// Call the tool with text containing PII:
anonymize_data({
  text: "Customer: John Smith\nEmail: john.smith@gmail.com\nSSN: 123-45-6789"
})

// Output:
{
  "anonymizedText": "Customer: Person1 Smith\nEmail: user1@example.com\nSSN: XXX-XX-XXXX",
  "totalDetections": 3,
  "typeBreakdown": { "name": 1, "email": 1, "ssn": 1 }
}

Example: anonymize_data — redact mode

// Call with redact mode for stricter replacement:
anonymize_data({
  text: "Call Jane Doe at (312) 555-0199 or jane.doe@company.com",
  mode: "redact"
})

// Output:
{
  "anonymizedText": "Call [NAME REDACTED] Doe at [PHONE REDACTED] or [EMAIL REDACTED]",
  "totalDetections": 3,
  "typeBreakdown": { "name": 1, "phone": 1, "email": 1 }
}
Live Demo

Try It Online

Paste text containing personal information below, select PII types to detect, and anonymize.

Paste Data to Anonymize

Customer records, support tickets, log files, or any text with PII

Try a demo:

PII Types to Detect

Paste data and click Anonymize Data to detect and replace PII.

Why Anonymize Data?

Understanding data anonymization helps you stay compliant and protect your users.

GDPR / CCPA Compliance

Data protection regulations require that personal data is protected. Anonymization removes PII so data can be used for testing, analytics, and sharing without violating privacy laws.

Consistent Anonymization

The same email or name always maps to the same replacement within a run. This preserves data relationships — if "john@test.com" appears 10 times, it becomes "user1@example.com" every time.

Data Utility vs Privacy

Good anonymization balances privacy with data utility. "Fake" mode preserves format and structure so anonymized data still works in tests and pipelines. "Redact" mode maximizes privacy.

Testing with Real-shaped Data

Anonymized production data makes the best test data. It preserves edge cases, character sets, and field lengths that synthetic generators miss, without exposing real user information.

Protect Every Record

Our Pro plan includes batch anonymization, custom PII patterns, and CI/CD integration for automated data protection.

View Plans