JSON Compact Online Tool
FAQ
Paste your JSON into the input box above. The tool parses it and outputs the same data on a single line with all unnecessary whitespace, indentation, and line breaks removed.
For example:
{
"name": "Ada",
"langs": ["en", "fr"]
}
minifies to:
{"name":"Ada","langs":["en","fr"]}
Minifying removes whitespace to make JSON as compact as possible for storage, network payloads, or embedding in config and environment variables. Formatting (pretty-printing) does the opposite: it adds indentation and line breaks so JSON is easier to read. To expand minified JSON again, use the JSON formatter.
Keys, string values, arrays, and nesting are preserved, and whitespace inside strings is kept. Because the JSON is parsed and re-serialized with JavaScript, numbers are normalized (for example, 1.0 becomes 1), integers larger than 2^53 can lose precision, and if an object has duplicate keys only the last value is kept.
The input must be valid JSON. Common causes are trailing commas, single-quoted strings, unquoted keys, and comments, none of which are allowed in standard JSON. Fix the reported syntax error and the output updates automatically.
No. Minification runs entirely in your browser, so the JSON you paste stays on your device.