JSON minifier
Strip whitespace from JSON to a single compact line and see exact bytes saved.
Runs 100% in your browserHow to minify JSON
- Paste your JSON. Paste or type valid JSON into the input box.
- Read the savings. Original and minified byte sizes are shown.
- Copy or download. Grab the minified payload with Copy or Download.
About JSON minification
Minifying JSON strips every byte that the parser does not require — newlines, indentation, spaces around colons and commas — producing the same semantic document on one line. The savings are largest for pretty-printed configuration files (often 25–40% smaller); for already-compact API responses, gzip will dominate any minification win. The output is always valid JSON because the page parses, validates, then re-serialises rather than doing a regex strip.
Frequently asked questions
- To shrink payloads sent over the wire — removing whitespace cuts 10–30% on heavily-indented data. Production APIs, cache entries and config files typically ship minified.
- Yes. The page parses with the browser's native JSON parser (strict, RFC 8259) and then re-serialises with no whitespace, so the output is always valid JSON.
- Minification removes whitespace at the data level; gzip compresses bytes at the transport level. Both stack — minified-then-gzipped JSON beats either alone.
- No. Minification runs in your browser and the strict CSP blocks any outbound network calls.