Remove Nulls from JSON
Strip null values out of a JSON document, and optionally empty strings, empty arrays and empty objects too. Cleaning runs bottom-up, so a container left empty by its children being removed is pruned as well. The status bar shows how many bytes you saved.
How to remove nulls from JSON
- Paste your JSON, or drop a file onto the input pane.
- Nulls are removed by default. Tick the additional boxes for empty strings, arrays and objects if those are noise in your data too.
- Leave pruning on so an object whose only key held a null disappears rather than becoming
{}. - Watch the byte counter — sparse API payloads and event logs often shrink 30–60%.
- Copy or download the cleaned JSON.
null is not always noise
Before stripping, be sure your consumer treats a missing key and a null key the same way. Three places where they differ:
- JSON Merge Patch (RFC 7396) uses
nullto mean delete this key. Removing the nulls from a merge patch changes what it does — see Merge Patch. - Partial updates. Many APIs read "key absent" as leave unchanged and "null" as clear the value.
- Typed decoders. A required field that is absent throws in some deserialisers, where an explicit null would have been accepted.
Removing false and 0 is riskier still — both are real values, not absence.
Those options exist for the specific case of a payload padded with defaults, and are off by default.
Privacy
Nothing is uploaded. The conversion runs in this tab using your own browser's JavaScript engine — no server sees your data, and the page keeps working with the network disconnected.
FAQ
Does it remove array elements too?
Yes — a null inside an array is removed and the array closes up, so indexes shift. If positions are meaningful, keep nulls in arrays and only clean objects.
What does pruning actually do?
It handles the second-order case. If {"meta": {"debug": null}} loses debug, meta becomes {}. With pruning on and Remove empty objects ticked, meta goes too. Turn pruning off to keep the empty shell.
Will this reduce my response size much?
It depends on how sparse the data is. Wide event records with many optional fields shrink dramatically; dense records barely change. For a full byte-level breakdown try Size analyzer.