Text Anonymizer

Scans text for likely email addresses and long digit sequences (7 or more digits, such as phone numbers or account numbers) using simple local pattern matching, and replaces each with a bracketed placeholder like [EMAIL] or [PHONE]. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-23

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.

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

Redacting an email and a phone number

Input

Contact Ada at ada@example.com or 555-123-4567.

Output

Contact Ada at [EMAIL] or [PHONE].

The email matches the email pattern and the hyphenated 10-digit number matches the phone-like digit-run pattern.

Best Practices & Notes

Best Practices

  • Always review the output manually before sharing; this tool only catches the specific patterns it's built to detect.

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.

References

Frequently Asked Questions