Skip to content

Remove Empty Values From JSON

Remove empty JSON values is a free OpenAnyDoc tool. Open or paste JSON, tick which empty kinds to drop, see the count and remove them.

Runs on your device: no upload, no sign-up, no ads How to check

Try a sample file:

You can also paste JSON text with Ctrl+V (⌘+V on a Mac).

  • JSON: View and edit. .json

Also works with CSV, TXT, Excel, Word, PDF, Image, ePub and PowerPoint files

Paste text instead

Pasted text stays in this tab and is never sent anywhere.

How it works: remove empty values from JSON

  1. Open or paste your JSON

    Choose a .json file, drop it on the page, paste the text into the box, or try one of the two samples.

  2. Tick the kinds to remove

    The box lists null values, empty text, empty objects and empty lists. The line under them says how many values will be removed.

  3. Press Remove

    The values are taken out on every level and a notice gives the number removed. Undo puts them all back.

  4. Copy or download

    Copy the cleaned JSON or download it as a .json file.

Remove empty JSON values: what it can't do

  • Up to ⁦10 MB⁩ per file
  • 0, false and text that holds only spaces are not empty and are always kept.
  • Removing an item from a list moves the items after it up one place.
  • The top value of the document always stays, even when it ends up empty.
  • The JSON must be valid first; a file with a syntax error opens with the error marked instead of the box.
  • Files up to 10 MB.

Questions about removing empty values

Is my file uploaded?
No, your JSON is never uploaded: it is read and cleaned by your browser, on your device. Pasted text stays in this tab.
Can I remove nulls but keep empty strings?
Yes, you can remove nulls and keep empty strings. Leave “null values” ticked and untick “Empty text”. Each of the four kinds is chosen on its own, and the count shows the effect before you press Remove.
Are keys removed along with their values?
Yes, in an object the whole key and value pair goes, so "phone": null disappears. In a list the item goes and the list gets shorter.
What happens to an object that only held nulls?
Once its nulls are gone it is an empty object. If “Empty objects” is ticked it is removed too, and so on up the document; if not, it stays as {}.
Does removing empty values also remove 0 or false?
No, zero and false are real values and are never treated as empty. Text made only of spaces is kept as well.
Is there a size limit for removing empty values from JSON?
Files up to 10 MB. Larger files are refused before they are read.

Why it's private: your files never leave your browser

Many online file tools upload your file, so a copy of it leaves your device. OpenAnyDoc works the other way round: your browser reads the file and draws it on your screen. Nothing is uploaded, there is no account, and the file is gone from memory when you close the tab, so there is nothing for us to store, see or lose.