JSON formatter
Validate JSON and make it easy to read.
Developer toolsRemove whitespace from valid JSON.
Getting your tool ready…
Create a compact representation of valid JSON by parsing it and serializing it without indentation. Whitespace inside string values stays intact. The output is normalized rather than a byte-for-byte whitespace edit, so number precision and duplicate-key behaviour follow the JavaScript JSON parser.
Add the data you want to compact.
Run the tool to parse and serialize it without extra formatting.
Copy the output or download the minified.json file.
No. The tool removes formatting whitespace around JSON structure; spaces contained in string values remain.
No. JavaScript parsing keeps the last value for a duplicate key. Avoid duplicate keys when the original data must be preserved.