Clean

Clean JSON payloads by stripping null, empty string, and undefined properties

Recursively purge null, empty string, and undefined attributes from JSON payloads.

🛡️ Your rows never leave your browser.
Why Onfyt: Recursively prunes empty nested containers, removing parent objects that become empty after their null children are stripped.

Interactive Sample Data

idnameemailphone
1Grace Kerubograce@corp.com+254712345678
2Peter Njorogepeter@corp.comnull

How this tool works

Null cells appear for three distinct reasons: a database column that genuinely has no value, a JOIN that found no matching row and left the field empty, or an export format that serializes missing data differently ("", null, NULL, N/A, \\N, or a literal string). Before loading data into a BI tool or training a model, nulls must be handled deliberately—either removed entirely or replaced with a sensible default—because most aggregation functions and all SQL UNIQUE constraints treat null as a special case, not a normal value. Furthermore, when submitting updates to REST or GraphQL APIs, sending explicit nulls can inadvertently overwrite existing database values or trigger schema validation rejections from strict backends. DataFix recursively inspects your JSON document and purges unwanted empty tokens. You can choose your prune criteria: removing strictly 'null' literals, removing empty strings (""), pruning empty nested objects ({}), or discarding empty arrays ([]). The resulting payload is compact, lightweight, and sanitized for API transmission. Recursively stripping null and empty attributes from nested JSON documents creates compact payloads that reduce network transfer size and eliminate downstream null errors. Dropping empty properties trims message size and prevents null-pointer errors across consumer microservices.

Things that usually go wrong

  • Removing rows with any null deletes more rows than expected if most rows have at least one empty column. Use column-specific mode instead.
  • The string literal 'null' (common in JSON exports) is treated as null.

Edge cases we tested

🧪 Nested objects containing only nulls ({'user': {'phone': null}})

Purges the child null and cleans up the orphaned parent object.

🧪 Arrays containing null elements ([1, null, 2])

Filters out null elements leaving clean packed array ([1, 2]).

🧪 Numeric zeros and boolean false values (0, false)

Preserved intact; valid falsy data is never confused with null.

Frequently Asked Questions

What counts as null?

Empty strings (''), the literal string 'null', 'NULL', 'N/A', 'n/a', 'NA', and actual JSON null values.

Can I fill nulls instead of removing them?

Yes — use the Fill Missing Values tool or Fill Down Blank Cells instead.

Related tools

Clean

Split Full Name into First and Last

Separate full name columns into dedicated first_name and last_name columns in CSV and Excel spreadsheets.

Open Tool →
Clean

Combine First and Last Name

Merge separate first and last name columns into a single clean full_name column, trimming extra spaces.

Open Tool →
Clean

Remove Duplicate Rows

Eliminate duplicate rows across your entire dataset or based on specific unique key columns.

Open Tool →