Remove empty, null & blank values from JSON online
One click drops every key, item, or column whose value is empty — null, "", [], or {} — while keeping meaningful zeros and false. Works on JSON, YAML, XML, TOML, JSON Lines, CSV, and ASCII tables, right in your browser.
What Remove Empties does
Real-world data is full of placeholder holes: a "note": "" nobody filled in, a "tags": [] that never got populated, a "middle_name": null from a database column that allows nulls. Remove Empties deletes every key, list item, or table column whose value is empty in one click, then rewrites the document so it stays valid in its current format.
A value is treated as empty — and removed — when it is:
nullorundefined- the empty string
"" - an empty array
[] - an empty object
{}
Everything else is kept. In particular, the cleanup is deliberately conservative so a stray click can never destroy real data: the number 0, false, and NaN are meaningful values and are never removed, and a whitespace-only string like " " is preserved too.
How to use it
- Paste or open your data in the Yellorn editor (JSON, YAML, XML, TOML, JSON Lines, CSV, or an ASCII table).
- Open the Format menu in the editor toolbar — the split button whose primary action is Smart Format — and choose Remove Empties under the Minify group.
- The editor is rewritten with the empty entries gone, and the status bar reports how many were removed (for example, “Removed 5 empty values”). One ⌘ + Z restores the original if you need it back.
What counts as empty — a worked example
Here is a typical object with a mix of empty holes and meaningful falsy values. Notice that age: 0 and active: false survive, because 0 and false are real data — only the genuinely empty fields are dropped:
// Before:
{
"name": "Ada",
"note": "",
"tags": [],
"meta": {},
"age": 0,
"active": false,
"address": null
}
// After Remove Empties:
{
"name": "Ada",
"age": 0,
"active": false
}Nested objects and arrays cascade
Pruning is recursive. Yellorn cleans the leaves first, then re-checks their parents: an object or array that becomes empty after its own empty children are removed is itself dropped by its parent. So an object whose every field is empty collapses all the way up:
// Before:
{
"user": {
"name": "",
"roles": [],
"prefs": { "theme": "" }
}
}
// After Remove Empties:
{}The document root itself is never deleted — you are cleaning a file, not throwing it away — so a top-level empty object or array is returned unchanged with nothing removed.
Beyond JSON: YAML, XML, TOML, CSV & tables
Remove Empties works across Yellorn's structured formats. Value-shaped formats — JSON, YAML, XML, TOML, and JSON Lines — prune empty keys and list items recursively, exactly like the JSON examples above.
Tabular formats behave differently on purpose. Deleting individual empty cells would make rows ragged and break the table's rectangular shape, so for CSV and ASCII tables Remove Empties instead drops whole columns that are empty in every row, and whole rows that are empty across every remaining column:
Before (the "note" and "archived" columns are empty everywhere): id,name,note,archived 1,Ada,, 2,Lin,, After Remove Empties: id,name 1,Ada 2,Lin
SQL and Raw Text have no key/value or tabular structure to clean, so the Remove Empties row is shown disabled for them. Everything runs in your browser — nothing you paste is ever uploaded to a server.
Frequently asked questions
How do I remove empty values from JSON online?
Open the JSON in Yellorn, open the Format split-button menu in the editor toolbar, and choose Remove Empties under the Minify group. Every key whose value is null, an empty string, an empty array, or an empty object is dropped, and the editor is rewritten as valid, pretty-printed JSON. It runs in your browser and a single Cmd/Ctrl + Z restores the original.
Does Remove Empties delete 0 or false?
No. Only genuinely empty values are removed — null, undefined, the empty string "", empty arrays [], and empty objects {}. Meaningful falsy values (the number 0, false, and NaN) are always kept, and a whitespace-only string like " " is preserved too, so the cleanup can never quietly destroy real data.
Does it clean nested objects and arrays?
Yes. Pruning is recursive and cascades: an object or array that becomes empty after its own empty children are removed is then dropped by its parent. So {"a":{"b":"","c":[]}} collapses all the way to {} because nothing meaningful survives inside it.
Which formats support Remove Empties?
JSON, YAML, XML, TOML, and JSON Lines prune empty keys and list items recursively. CSV and ASCII tables instead drop whole columns that are empty in every row and rows that are empty across every remaining column, so the table stays rectangular. SQL and Raw Text have no key/value structure, so the drawer row is shown disabled for them.
Is my data uploaded when I remove empty values?
No. Parsing, pruning, and re-serializing all happen locally in your browser, so it is safe to clean JSON that contains API responses, tokens, or customer data. Nothing you paste is sent to a server, and the status bar reports how many values were removed.
Related
Where to go next
Try a fix in the editor or browse more articles.