Overview
Introduction
Before sharing sample text publicly, it's often useful to strip out obvious contact details like email addresses and phone numbers.
This tool runs entirely client-side, using simple local pattern matching, so nothing you paste is ever uploaded to a server.
What Is Text Anonymizer?
A basic anonymization tool that finds likely email addresses and long digit sequences using regular expressions and replaces each with a bracketed placeholder tag.
It's part of this site's String Tools collection. It performs only basic pattern-based redaction, NOT a comprehensive PII scrubber, so it should not be relied on alone for sensitive or regulated data.
How Text Anonymizer Works
The tool first replaces anything matching an email-like pattern (`user@domain.tld`) with [EMAIL].
It then scans for digit runs of at least 7 digits (allowing spaces, dashes, dots, or a leading +) and replaces each with [PHONE] if it contains a separator, or [NUMBER] if it's a plain unbroken digit run.
When To Use Text Anonymizer
Use it for a first pass at hiding obvious emails and long numbers from sample text, log excerpts, or a support ticket before sharing it publicly.
It's a fast, local way to reduce accidental exposure of contact details in casual text, though it should not be treated as a compliance-grade redaction step.
Often used alongside Word Censor and Find & Replace Tool.
Features
Advantages
- Runs entirely in the browser with no upload of your text.
- Distinguishes phone-like numbers (with separators) from plain digit runs.
- Replaces email addresses before scanning for digit runs, so a numeric local part inside an address is not mistaken for a phone number.
Limitations
- Not a comprehensive PII scrubber; it does not detect names, addresses, dates of birth, or IDs shorter than 7 digits.
- Pattern matching can produce false positives or false negatives on unusual formats.
Examples
Best Practices & Notes
Best Practices
- Always review the output manually before sharing; this tool only catches the specific patterns it's built to detect.
- Treat it as a first pass rather than a guarantee, since names, addresses, and account references written in prose are not pattern-matchable and survive untouched.
- Check the result for digit runs that were legitimate content, such as an order quantity or a year range, which are replaced alongside the real identifiers.
Developer Notes
Two regexes run in sequence: `/[\w.+-]+@[\w-]+\.[\w.-]+/g` for emails, then `/\+?\d[\d\-.\s]{5,}\d/g` for digit runs, which are only replaced when the total digit count in the match is 7 or more, tagging [PHONE] when a non-digit separator is present and [NUMBER] otherwise.
Text Anonymizer Use Cases
- Redacting contact details from a support ticket before sharing it
- Hiding phone numbers in sample or demo text
- Scrubbing obvious identifiers from a log excerpt for a bug report
Common Mistakes
- Assuming this tool detects all PII; it only targets emails and long digit sequences.
- Relying on this alone for legally or contractually required redaction.
Tips
- Combine this with a manual review pass for text that may contain names, addresses, or other identifying details.
- Counting the placeholders against what you expected is the quickest way to notice that something was either missed or over-matched.