Remove nulls, empty strings, empty collections, default values, and duplicates from JSON data. Optionally trim whitespace, sort keys, and truncate oversized content. A comprehensive cleanup utility for normalizing messy data.
Each cleanup operation can be toggled independently. Enable multiple operations to clean data in a single pass.
Delete object keys that have null values at any depth.
Delete object keys that have empty string "" values.
Delete empty objects {} and empty arrays [].
Delete falsy defaults — 0 and false. Useful for stripping placeholder values.
Remove duplicate items in arrays. Compares both primitive values and full objects (deep equality).
Trim leading and trailing whitespace from all string values throughout the document.
Sort object keys alphabetically at all levels.
Truncate strings longer than a specified character count (0 = no limit).
Keep only the first N items in arrays (0 = no limit).
Remove base64 strings and long single-line values larger than 1KB.
| Field | Type | Default | Description |
|---|---|---|---|
| Target Paths | path-picker | [] | Scope operations to specific paths only (empty = apply everywhere) |
| Remove Null Values | boolean | false | Remove object keys with null values |
| Remove Empty Strings | boolean | false | Remove object keys with empty string values |
| Remove Empty Collections | boolean | false | Remove empty objects {} and arrays [] |
| Remove Default Values | boolean | false | Remove falsy defaults (0, false) |
| Remove Duplicates | boolean | false | Remove duplicate items in arrays |
| Trim Whitespace | boolean | false | Trim leading/trailing whitespace from strings |
| Sort Keys | boolean | false | Sort object keys alphabetically |
| Max String Length | number | 0 | Truncate strings beyond this length (0 = no limit) |
| Max Array Length | number | 0 | Keep only first N array items (0 = no limit) |
| Remove Large Blobs | boolean | false | Remove base64 and large single-line values (>1KB) |
__v, _id) with empty values| Name | Type | Default | Description |
|---|---|---|---|
| Target Paths | path-picker | [] | Scope operations to specific paths only (empty = apply everywhere) |
| Remove Null Values | boolean | false | Remove object keys that have null values |
| Remove Empty Strings | boolean | false | Remove object keys that have empty string values |
| Remove Empty Collections | boolean | false | Remove empty objects {} and empty arrays [] |
| Remove Default Values | boolean | false | Remove falsy defaults (0, false) |
| Remove Duplicates | boolean | false | Remove duplicate items in arrays (primitives and objects) |
| Trim Whitespace | boolean | false | Trim leading and trailing whitespace from all string values |
| Sort Object Keys | boolean | false | Sort object keys alphabetically |
| Max String Length | number | 0 | Truncate strings longer than this many characters (0 = no limit) |
| Max Array Length | number | 0 | Keep only the first N items in arrays (0 = no limit) |
| Remove Large Blobs | boolean | false | Remove base64 strings and long single-line values larger than 1KB |
Clean up this JSON and remove noisy values and remove nulls and empties.1{2 "name": "Alice",3 "bio": "",4 "age": 30,5 "address": null,6 "tags": [],7 "meta": {}8}1{2 "name": "Alice",3 "age": 304}curl -X POST https://your-domain.com/api/v1/utilities/cleanup.clean-json \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"inputs":{"primary":{"name":"Alice","bio":"","age":30,"address":null,"tags":[],"meta":{}}},"config":{"removeNulls":true,"removeEmptyStrings":true,"removeEmptyCollections":true,"removeDefaults":false,"removeDuplicates":false,"trimStrings":false,"sortKeys":false}}'1{2 "name": "Alice",3 "age": 304}