🚫 JSON 打码(隐藏敏感字段)Censor JSON
按字段名把 JSON 里的敏感值替换成 *** 或自定义占位符(支持逗号分隔的多个键名,可递归)。适合脱敏日志,本地处理。Replace sensitive JSON values with *** or a custom placeholder by field name (comma-separated keys, recursive). Handy for redacting logs. Processed locally.
使用说明与常见问题How-to & FAQ
「JSON 打码(隐藏敏感字段)」是什么?What is the Censor JSON tool?
按字段名把 JSON 里的敏感值替换成 *** 或自定义占位符(支持逗号分隔的多个键名,可递归)。适合脱敏日志,本地处理。Replace sensitive JSON values with *** or a custom placeholder by field name (comma-separated keys, recursive). Handy for redacting logs. Processed locally.
如何使用「JSON 打码(隐藏敏感字段)」?How do I use the Censor JSON tool?
在「JSON 打码(隐藏敏感字段)」中,把内容粘贴或输入到上方输入框,按需设置「字段名(逗号分隔)」、「占位符」,结果会实时显示在下方,点击「复制结果」即可复制。In the Censor JSON: Paste or type into the input box, adjust "Field names (comma-separated)", "Placeholder"; the result appears below instantly — click "Copy result" to copy it.
会改结构吗?Does it change the structure?
只替换匹配字段的值,键名和嵌套结构保持不变;其他值(包括很大的整数)原样保留。constructor、toString 这类名字只有写进字段列表才会被打码。Only matching field values are replaced; keys and nesting stay the same, and every other value (including very large integers) is kept exactly. Names such as constructor or toString are only censored if you list them.
大数字和重复键会怎样?What about big numbers and duplicate keys?
数字按原文保留,不经过 JavaScript 浮点:12345678901234567890、1e400、1.50 原样输出,不会变成 12345678901234567000、Infinity 或 1.5。重复的键按 JSON 规则保留最后一个值,并在结果下方提示是哪个键。语法错误会写出第几行第几列。Numbers are kept exactly as written, with no JavaScript floating-point step: 12345678901234567890, 1e400 and 1.50 come out unchanged instead of 12345678901234567000, Infinity or 1.5. Duplicate keys keep the last value, as JSON parsers do, and a notice below the result names the key. Syntax errors give the line and column.
输入和输出是什么样的?What does the input and output look like?
例如在「JSON 打码(隐藏敏感字段)」中输入 {"user":"a","password":"x"},「字段名(逗号分隔)」设为 password,输出为:{ ⏎ "user": "a", ⏎ "password": "***" ⏎ }(⏎ 表示换行)。For example, the Censor JSON turns the input {"user":"a","password":"x"}, "Field names (comma-separated)" set to password into: { ⏎ "user": "a", ⏎ "password": "***" ⏎ } (⏎ marks a line break).
有哪些选项可以调整?What options can I adjust?
「JSON 打码(隐藏敏感字段)」的设置:「字段名(逗号分隔)」默认 password,token,secret;「占位符」默认 ***;可勾选:「区分大小写」、「压缩输出」。每次生成结果都按当前设置处理。Settings in the Censor JSON — "Field names (comma-separated)" default password,token,secret; "Placeholder" default ***; tick boxes: "Case-sensitive", "Minify". The result always uses the current settings.
代码或数据会被上传吗?Is my code or data uploaded?
不会。「JSON 打码(隐藏敏感字段)」完全用 JavaScript 在本地运行,适合处理含有密钥、内部接口等敏感内容的数据。No. The Censor JSON runs entirely in local JavaScript, so it is safe for data containing keys or internal endpoints.
「JSON 打码(隐藏敏感字段)」免费吗?需要注册吗?Is the Censor JSON free? Do I need an account?
「JSON 打码(隐藏敏感字段)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Censor JSON is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.