JSON minify
Strip all the whitespace from JSON to get the smallest valid document, and see exactly how many bytes you saved.
Strip all the whitespace from JSON to get the smallest valid document, and see exactly how many bytes you saved.
To make minified JSON readable again, use the JSON formatter. If it won’t parse, the JSON validator points to the exact character.
It removes every space, tab and line break that is not inside a string. The result is the same data in the fewest bytes, which is ideal for API payloads, config embedded in HTML, or localStorage.
Typically 10–40% for pretty-printed JSON, depending on how deep the nesting and how wide the indentation is. The panel shows the exact before and after size.
Yes. Whitespace between tokens is optional in JSON (RFC 8259, section 2), so minified and pretty-printed versions parse to exactly the same value.
It still helps a little, but gzip or Brotli compression already removes most of the cost of repeated whitespace. Minify when you are storing or embedding JSON that won’t be compressed.