Remove empty values from JSON

Runs locally

Strip nulls, empty strings, empty arrays and empty objects at every level.

JSON input

Result

Paste JSON on the left — the result appears here automatically.

About removing empty values

How it works in 4 steps · 4 common use cases · 3 questions answered

How it works

  1. 1.Paste the document you want cleaned.
  2. 2.Nulls, empty strings, empty arrays and empty objects are all removed.
  3. 3.The pass runs bottom-up, so a branch left empty after its children are dropped disappears as well.
  4. 4.Copy the result.

Common use cases

  • •Cutting a verbose API response down to the fields that carry a value
  • •Cleaning a form submission where untouched fields came through as empty strings
  • •Removing scaffolding from a generated config before committing it
  • •Making two payloads comparable when one serialises empty values and the other omits them

FAQ

How is this different from Remove Nulls?

Remove Nulls drops only null. This also drops "", [] and {}, and then removes any parent left empty as a result.

Is zero or false removed?

No. 0, false and "0" are real values, not empty ones, and are always kept — which is where a naive falsy check in application code usually goes wrong.

What does bottom-up mean here?

Children are cleaned before their parent is checked. So an object whose only key held an empty array becomes empty itself and is then removed too, rather than surviving as {}.