Minify JSON

How to minify JSON

Minifying JSON removes spaces and line breaks. It does not change the data—only the formatting.

Before and after

Pretty printed:

{
  "a": 1,
  "b": [1, 2, 3],
  "c": "hello"
}

Minified:

{"a":1,"b":[1,2,3],"c":"hello"}

When minifying helps

When not to minify

Related: Pretty print JSON · Compare JSON