Data Masking
Free online data masking tool, no installation required
About Data Masking
Redacts sensitive data patterns in text using type-aware masking rules. It supports eight modes - phone, email, ID card, credit card, bank card, name, address, and custom regex - each preserving enough context to stay recognizable while hiding the sensitive portion. Input is processed line-by-line and each line is flagged as matched or unmatched so you can verify coverage at a glance.
How to Use
1. Select a masking type from the row of buttons at the top. 2. Optionally click Load Example to populate sample input for the chosen type. 3. Paste your text (one value per line) into the input area. 4. Click Mask to process; results appear with a matched/unmatched indicator and a badge showing matched count out of total. 5. Click Copy to copy all masked values joined by newlines, or Clear to reset.
Masking Rules Per Type
Phone matches international and domestic formats and keeps the first 3 and last 4 digits (e.g., 138****5678). Email keeps the first 2 characters and the domain (zha***@example.com); short local-parts are masked differently. ID card masks middle digits of 15- or 18-digit Chinese ID cards, keeping prefix and suffix. Credit card collapses to **** **** **** LAST4. Bank card shows only the last 4 digits. Name keeps first and last character for names longer than 3 chars, else keeps only the first. Address keeps roughly 30% of the prefix and 20% of the suffix. Custom lets you provide a regex pattern and a replacement string (defaults: (\d{3})\d+(\d{3}) -> $1****$2).
▶Does masking work across multiple matches per line?
▶Why is my credit card number not masked?
▶Can I use my own regex for masking?
▶Are masked values safe to share?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee