🧹 JSON 清理工具(去空值)JSON Cleaner (Remove Empty Values)
递归删除 JSON 中的 null、空字符串、空数组、空对象,可去掉字符串首尾空格、删除指定键名,清理后变空的父级也一并移除。Recursively remove nulls, empty strings, empty arrays and empty objects from JSON, trim strings, drop keys by name, and remove parents that become empty.
使用说明与常见问题How-to & FAQ
「JSON 清理工具(去空值)」是什么?What is the JSON Cleaner (Remove Empty Values) tool?
递归删除 JSON 中的 null、空字符串、空数组、空对象,可去掉字符串首尾空格、删除指定键名,清理后变空的父级也一并移除。Recursively remove nulls, empty strings, empty arrays and empty objects from JSON, trim strings, drop keys by name, and remove parents that become empty.
如何使用「JSON 清理工具(去空值)」?How do I use the JSON Cleaner (Remove Empty Values)?
粘贴 JSON,勾选要删除的内容类型,需要时在「删除键名」里填逗号分隔的键名,下方即输出清理后的 JSON 并统计删除了多少项。Paste JSON, tick what to remove, optionally list key names to drop (comma-separated), and the cleaned JSON appears below with a count of removed items.
父级对象清空后也会被删除吗?Are parents that become empty removed too?
会。清理是自下而上进行的:例如 {"a":{"b":null}} 删除 b 后 a 变成空对象,如果勾选了「空对象」,a 也会被删除。Yes. Cleaning works bottom-up: in {"a":{"b":null}}, removing b leaves a empty, so a is removed too when "Empty objects" is ticked.
0 和 false 默认会被删除吗?Are 0 and false removed by default?
不会,它们通常是有意义的值。只有勾选「删除 0 和 false」时才会删除。No — they are usually meaningful. They are removed only when you tick "Remove 0 and false".
「JSON 清理工具(去空值)」免费吗?数据会上传吗?Is the JSON Cleaner (Remove Empty Values) free? Is my data uploaded?
「JSON 清理工具(去空值)」完全免费,无需注册或安装,手机和电脑都能用;所有处理都在你的浏览器本地完成,输入的内容和文件不会上传到服务器。The JSON Cleaner (Remove Empty Values) is completely free with no sign-up or install and works on phones and desktops; everything runs locally in your browser and nothing you enter is uploaded.