JSON Minifier
Strip whitespace and see how many bytes you save
Input (JSON)
Minified
212 bytes to 155 bytes, 27% smaller
JSON Minifier guide
Whitespace makes JSON readable for people but adds bytes for machines. The JSON Minifier removes every space, tab, and line break outside strings, so the data is as small as it can be for an API payload, a config value, or a URL, and it shows how much you saved.
What minifying removes
Only whitespace between values is removed. Text inside strings, spaces included, stays exactly as it was, and the data itself doesn't change. The same exceptions as formatting apply: 1.0 is written as 1, and very large integers lose precision, which the tool warns about.
When it helps
- Sending JSON in an API request or response, where every byte is transferred.
- Storing JSON in a database column, an environment variable, or a query parameter.
- Embedding data in HTML or JavaScript.
Minifying and gzip
If your server already compresses responses with gzip or Brotli, minifying saves less, because compression removes most of the repeated whitespace too. It still helps wherever the JSON is stored or sent uncompressed.
Example
{
"id": 1042,
"active": true
}
// minified
{"id":1042,"active":true}