Data Masking Tool

Mask ID card numbers and phone numbers locally in your browser.

Privacy First All processing is done entirely in your browser. No data is uploaded to any server.
Input Text Paste text containing ID cards or phone numbers
Result Masked text will appear here

Data Masking Tool / 数据脱敏工具

This free online data masking tool quickly redacts Chinese ID card numbers and mobile phone numbers in any text — and because everything runs locally in your browser, your data never leaves your device. 本工具可快速对文本中的身份证号、手机号进行脱敏处理,所有计算在浏览器本地完成,不会上传任何数据。It is the right choice whenever you need to show "somebody's record" without showing who it belongs to.

What is data masking? / 什么是数据脱敏?

Data masking (anonymization / redaction) replaces sensitive parts of a value with placeholder characters while keeping the value useful and recognizable. Masked data is pseudonymous: it preserves the shape of the record (18 digits, 11 digits) but hides the identity behind it. It is a core technique in privacy compliance frameworks such as GDPR and China's Personal Information Protection Law (个保法 / PIPL), where "de-identification" of personal data is a first-class requirement.

Supported patterns / 支持的规则

  • Chinese ID card (身份证号, 18 digits) — keeps the first 4 and last 4 digits, masks the middle 10: 1101**************1234
  • Phone number (手机号, 11 digits) — keeps the first 3 and last 4 digits, masks the middle: 138****5678
  • Custom range (自定义位置) — mask any digit positions you specify in any sequence of 6+ digits, for card numbers, order IDs, license plates, etc.

When to use it / 使用场景

  • Sharing order or user data in support tickets and bug reports without leaking PII 工单/反馈中分享数据前先脱敏
  • Preparing screenshots and log excerpts for public posts and documentation 截图、日志公开前去除敏感信息
  • Testing and demo environments that need realistic but safe data 测试环境使用仿真数据
  • Compliance workflows: produce de-identified samples for audits and data processing agreements 合规审计的数据样本

Privacy / 隐私说明

No server round-trip exists at all: masking is a few regular expressions executed on your machine, so it works offline and nothing is logged or transmitted. 脱敏是本地正则替换,全程无网络请求,断网可用。

FAQ / 常见问题

Q: Does masking make data unrecoverable? / 脱敏后能还原吗? — Masked output alone is not reversible by this tool; it is a display-time transformation, not encryption. Treat masked data as safe to share, but keep originals restricted. 脱敏结果不可逆,原数据仍需管控。

Q: Why are my phone numbers not masked? / 手机号没被脱敏? — The tool matches mainland-mobile patterns (11 digits starting 1[3-9]) and 18-digit IDs; other formats need the custom range option. 仅匹配大陆手机号(1[3-9] 开头 11 位)和 18 位身份证,其他格式请用自定义位置。

Related tools / 相关工具

  • Text Info Extractor — find the phone numbers and IDs before masking them 文本信息提取
  • EXIF Remover — strip location data from photos you share alongside text 图片 EXIF 清除
  • Regex Builder — build & test regexes with plain-language questions 正则生成