JSON Minifier
Strip whitespace from JSON and see how much you saved.
Something went wrong
Original
—
Minified
—
Saved
—
Processed locally in your browser. Nothing you type here is sent to our servers.
What is the JSON minifier?
Minifying JSON removes every byte that a parser does not need — the indentation, the newlines, and the spaces after colons and commas. The data is identical; only the presentation changes. What you get back is the smallest valid JSON that represents the same document.
The input is validated as part of the process, so if the document will not parse you get the line, the column and an explanation rather than silently mangled output.
How to use it
- Paste your JSON into the input panel.
- Press Minify, or ⌘/Ctrl + Enter.
- Check the size comparison to see what you actually saved.
- Copy the result or download it as a file.
Common use cases
- Shrinking a payload before embedding it in a URL, a header or a data attribute.
- Reducing the size of a fixture or seed file committed to a repository.
- Measuring the real transfer cost of an API response, separate from formatting.
- Preparing JSON for a system with a strict field length limit.
For HTTP responses specifically, minifying matters less than you might expect: gzip and Brotli compress repeated whitespace very effectively, so the saving over the wire is usually far smaller than the saving on disk. It is worth measuring before treating it as an optimisation.
Limitations
- Minifying re-serialises the document, so numbers pass through IEEE 754 doubles. Integers beyond 253 lose precision — keep large IDs as strings.
- Whitespace inside string values is data, not formatting, and is always preserved.
- Duplicate keys collapse to the last occurrence, which is what every JSON parser does anyway.
- The size comparison measures UTF-8 bytes, which is what travels over the network — not the character count.