← All text tools

JSON Null and Empty Value Remover

Strip null, empty string, empty array and empty object values from JSON at every depth, and prune containers left empty.

  • Free
  • No sign-up
  • Works on any device

About JSON Null and Empty Value Remover

APIs and databases often return fields that are null or empty, which bloats payloads and confuses code that checks whether a key exists. This tool walks the whole document and removes the kinds of empty values you tick: null, empty strings, empty arrays and empty objects. Cleaning works from the inside out, so with pruning on an object whose only content was empty becomes empty itself and is removed too. Counts for each kind show what disappeared, and the same rules apply inside arrays, so a null item is dropped and the array gets shorter.

How to use JSON Null and Empty Value Remover

  1. Paste the JSON that contains empty fields.
  2. Tick which empty values to remove, and whether containers left empty should be pruned.
  3. Check the counts of removed values and copy the cleaned JSON.

Why use this tool?

Also known as

Frequently asked questions

Does removing an empty object also remove its parent?

Only if you keep pruning ticked. Then a parent that becomes empty after cleaning is removed as well, all the way up, but the top-level value always stays.

Are zero and false treated as empty?

No. Only null, the empty string, the empty array and the empty object are ever removed. The numbers 0 and the value false are real data and are kept.

What about nulls inside arrays?

They are removed too, which shortens the array and shifts the later items. Untick null removal if array positions matter for your data.

Is JSON Null and Empty Value Remover free?

Yes. JSON Null and Empty Value Remover on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

Can I put JSON Null and Empty Value Remover on my own website?

Yes. Use the Embed on your site button under the tool to copy a short piece of code and paste it into your page. It is free, needs no account, and the tool keeps working inside your page.

Related tools