Skip to main content
CuteJSON
↑↓ Navigate Enter Select Esc Close

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.

Back to all tools

Keyboard shortcuts

These work wherever the matching action exists on this page.

Open the command palette
Ctrl/Cmd + K
Run the main action
Ctrl/Cmd + Enter
Format
Ctrl/Cmd + Shift + F
Minify
Ctrl/Cmd + Shift + M
Copy output
Ctrl/Cmd + Shift + C
Open file
Ctrl/Cmd + Shift + O
Download output
Ctrl/Cmd + S
Close this dialog
Esc
Open this dialog
F1 / ?

Local data

Everything below is stored only in this browser, on this device. None of it is ever sent anywhere, and closing this dialog is not required for that to stay true.

Unsaved drafts
Tools with remembered options

Recently opened files

    No files opened yet on this device.

    Share via link

    The content is packed into the part of the link after the # sign, which browsers never send to a server. Nothing here is uploaded to cutejson.com or anywhere else.

    Shares the first input on this page. On a tool with more than one, only that one is included.

    Nothing to share yet. Paste or type something first.

    Input

    Load from a URL

    Fetches the URL directly from your browser and loads whatever text it returns into this pane.

    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.

    Runs entirely in your browser. Nothing you paste is uploaded, and you can confirm that in your browser Network tab.

    About this tool

    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.

    How to use

    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.