跳转到主要内容
CuteJSON
↑↓ 导航 Enter 选择 Esc 关闭

JSON Cleaner

Strip what a document does not need, rename or redact what it should not show, and keep only the paths that matter, in one pass.

返回所有工具

键盘快捷键

这些快捷键在页面上对应操作存在时有效。

打开命令面板
Ctrl/Cmd + K
运行主要操作
Ctrl/Cmd + Enter
格式化
Ctrl/Cmd + Shift + F
压缩
Ctrl/Cmd + Shift + M
复制输出
Ctrl/Cmd + Shift + C
打开文件
Ctrl/Cmd + Shift + O
下载输出
Ctrl/Cmd + S
关闭此对话框
Esc
打开此对话框
F1 / ?

本地数据

以下所有内容仅存储在此浏览器、此设备上。

未保存的草稿
记住选项的工具

最近打开的文件

    此设备上尚未打开任何文件。

    通过链接分享

    内容被打包在链接 # 号之后的部分。

    分享此页面上的第一个输入。

    暂无可分享的内容。

    输入

    从 URL 加载

    直接从浏览器获取 URL。

    Result

    The cleaned document appears here.

    Rules

    One rule per line in each box. A rule that matches nothing in this particular document is listed under the result rather than treated as a failure.

    完全在您的浏览器中运行。

    关于此工具

    Twelve operations, run in one fixed order rather than whatever order they happen to be turned on in, because several of them would give a different answer depending on order. First, a genuine duplicate key already in the pasted document is resolved, keeping the last member written or the first, whichever the duplicate keys setting below says, since every step after this one assumes one member per name the way a JSON Pointer does. Keep paths, if any are set, prune the document down to just those paths and whatever it takes to reach them. Delete paths removes exactly what it names. Rename keys is a global, exact key name replace, at any depth. Redact keys replaces the value of any member whose key exactly matches, at any depth, with the fixed text [REDACTED]. Mask paths replaces the value at a pointer with the fixed text ***. Then the five plain toggles run together in one pass: removing null values, removing objects and arrays that are empty, including ones only emptied by the null removal that just ran in the same pass, trimming whitespace from string values, and dropping a later array element equal to an earlier one. Key case normalization runs last of all, deliberately, so every step above it can still match a key by the name it actually had in the document that was pasted in, before anything renamed or recased it. A path that does not resolve is not an error: it is noted underneath the result and skipped, since the same saved rule set is meant to stay reusable across documents that do not all share the exact same shape. A pointer that is not well formed, or a rename rule missing its arrow, is an error instead, since that is a mistake in what was typed rather than a mismatch with this particular document.

    使用方法

    1. Paste your JSON into the editor, or load the sample.
    2. Turn on whichever toggles apply, and add a rename, delete, keep, mask or redact rule, one per line, in any of the boxes below.
    3. Press Clean. Anything a rule could not find in this document is listed under the result rather than silently ignored.