Remove formatting whitespace from JSON
Paste valid JSON and leave Minify selected. The input { "name": "Alice", "active": true } becomes {"name":"Alice","active":true}. Spaces inside string values remain, so {"name":"Alice Smith"} keeps the space between the names.
Select a beautify mode to make the same parsed data easier to read. Copy the JSON from the output field. The byte-size report appears separately and compares the minified representation with a 2-space representation, regardless of the selected output mode.
Understand what parsing can change
This tool parses and serializes JSON. It can normalize numeric notation and escape sequences, and duplicate object keys reduce to their last value. JavaScript may round integers beyond its safe range. Store large IDs as strings if every digit must survive a conversion.
Minification removes formatting rather than compressing the data with an archive format. The size report measures UTF-8 bytes, not network transfer size. Use the JSON syntax checker to investigate invalid input or the JSON formatter for a simpler indentation tool.
Common questions
- Does minifying remove spaces inside strings?
- No. Whitespace inside a JSON string is data and remains in the output. Minification removes formatting around JSON values.
- What does the savings figure compare?
- It compares the UTF-8 byte sizes of the minified output and the 2-space beautified output. It does not measure savings against the original input or a compressed network response.