Text Masker
Mask sensitive information in text โ phone numbers, emails, credit cards, SSN, ID cards, API keys, JWT tokens, MAC addresses. Custom regex support, file batch processing. 100% browser-based, privacy first. Free online tool.
Frequently Asked Questions
What is data masking?
Data masking (also called data redaction or data obfuscation) is the process of replacing sensitive information with masked characters (like asterisks) to protect privacy. For example, a phone number 13812345678 becomes 138****5678, and an email john.doe@example.com becomes j***@example.com.
What types of sensitive data can this tool mask?
The tool can mask: phone numbers (various international formats), email addresses, credit card numbers (16-19 digits), US Social Security Numbers (SSN in XXX-XX-XXXX format), Chinese ID card numbers (18 digits), IPv4 addresses, API keys (common patterns like sk-, pk-, AKIA, ghp_, etc.), JWT tokens (eyJ... format), and MAC addresses (XX:XX:XX:XX:XX:XX). You can also add custom regex patterns for any other data type.
How do custom regex patterns work?
Enter a regular expression pattern (e.g. ORDER-\d8 to match order numbers like ORDER-12345678), give it a label (e.g. ORDER), and click Add. The tool will find all matches and mask them. In placeholder mode, matches will be replaced with [ORDER]. You can add multiple custom patterns.
What are the different mask styles?
Three styles are available: Partial mask preserves some characters (e.g. 138****5678, j***@example.com); Full mask replaces everything with asterisks (e.g. ************); Placeholder replaces with a type label (e.g. [PHONE], [EMAIL], [API_KEY]). Placeholder mode is useful when you need to know what type of data was redacted.
Can I process files?
Yes! Click the file upload area to load .txt, .csv, .log, .json, .xml, or .yaml files. The file content will be loaded into the input field, and you can mask it just like pasted text. The file never leaves your browser โฆall processing is local.
How are phone numbers masked?
Phone numbers are detected using international patterns (with or without country code). In partial mode, the first 3 digits and last 4 digits are preserved, with the middle digits replaced by asterisks. For example: 13812345678 โ138****5678, +1-555-123-4567 โ+1-5*********4567.
What API key patterns are detected?
The tool detects common API key formats: AWS keys (AKIA...), Stripe keys (sk_..., pk_...), GitHub tokens (ghp_..., gho_..., ghs_...), Slack tokens (xox[bp]-...), Google API keys (AIza...), and generic long alphanumeric tokens (32+ characters). This covers most major service API keys.
Is my data safe?
Yes, all masking happens entirely in your browser using JavaScript. Your text and files are never uploaded to any server. This makes it safe to use with real sensitive data โฆnothing leaves your device.