TOOLTIKI Lovable tool, really free
Developer Formatting

JSON empty value remover

What to do
Indent

Processed in your browser · nothing is uploaded

Local · false and 0 are kept
Advertisement
320 × 100

Strips null, empty strings, empty arrays and empty objects recursively — so a branch left empty because its contents were removed is removed too.

How to use the json empty value remover

1 Paste your input. The result appears immediately.
2 Pick the operation you want.
3 Copy the result, or save it as a file.

Recursion is the part naive implementations skip: removing a null inside an object can leave that object empty, and leaving the husk behind defeats the purpose. Working bottom-up handles it. Be careful about what counts as empty, though — this treats null and the empty string as removable and keeps `false` and `0`, because those are meaningful values and dropping them is a real bug. If your API distinguishes "absent" from "explicitly null", this changes the meaning of the document rather than tidying it.

Questions

No. Those are meaningful values. Only null, empty strings and empty containers go.

ECMA-404 — the JSON data interchange syntaxMDN — JSON.parse()
Advertisement
300 × 250
Was this tool any good?
INTERNAL SIGNAL ONLY · WE USE IT TO FIND TOOLS WORTH REBUILDING