JSON Minifier
Minify JSON by removing insignificant whitespace, with exact size savings reported and string contents preserved byte for byte.
Object keys are output in alphabetical order instead of their original insertion order.
JSON.stringify so 1.0 becomes 1 (that is the same JSON number, not a change in value).How it works
- Type or paste your JSON into the text area.
- The minified version updates as you type, in your browser.
- Copy the result or download it as a .json file.
Frequently Asked Questions
How is the whitespace removed?
By parsing the JSON and re-serialising it with no spacing, using the browser’s own JSON parser. That is the only approach guaranteed to produce output that parses back to exactly the same value — stripping whitespace with a search-and-replace corrupts any string that contains a space, a brace or a newline.
Are the strings inside my JSON changed?
No. Whitespace inside string values is data and is preserved exactly, including newlines and tabs. Only the formatting between tokens is removed.
Why did my numbers change?
They did not change value. JSON canonicalises numbers, so 1.0 is written as 1 and 1e2 as 100 — those denote the same JSON number. If the exact text matters, the value should be a string.
Is my JSON uploaded?
No. Parsing and minification happen entirely in your browser. Nothing is sent anywhere, which matters because configuration and API payloads routinely contain secrets.