JSON Minifier
JSON Minifier removes every space, tab and line break that JSON does not need, producing the most compact form of the same data.
How to use it
- Paste your formatted JSON into the input box
- Click Minify — the JSON is validated first
- Copy the compact result with one click
It validates first: an invalid document is rejected with a clear error rather than minified, so you never ship broken JSON. The values are untouched, but — like the formatter — a round-trip through the browser's JSON engine keeps only the last of any duplicate object key and can re-order integer-like keys. Use it to shrink a request body or an embedded config; use JSON Formatter for the reverse, when you need indentation to read or diff a document. There is no XML equivalent — the XML tool only re-indents. Input is limited to 2 MB, about 100,000 values and 64 nesting levels, and the document never leaves your browser.
FAQ
Yes. An invalid document is rejected with an error and nothing is produced, so the output is always valid JSON.
Values yes. Key order is not: a duplicate object key keeps only its last value and integer-like keys can be re-ordered, because the document is re-serialised through the browser's JSON engine.
No. The XML tool only re-indents — a well-formedness check plus fixed two-space indentation. There is no XML minify option.