JSON Minifier

Minify JSON by removing all unnecessary whitespace and line breaks. See the size before and after, copy the result or download it. Fast, free and private.

Paste some JSON to get started.

Runs locally in your browser. Nothing you enter is uploaded.

How to minify JSON

  1. Paste your JSON into the input.
  2. The minified version appears instantly, with the size before and after.
  3. Optionally sort keys for a canonical form.
  4. Copy or download the result.

Example

{
  "id": 42,
  "tags": ["a", "b"]
}

becomes

{"id":42,"tags":["a","b"]}

When to minify JSON

Frequently asked questions

Does minifying change my data?

No. Minification only removes whitespace between tokens. Keys, values, strings (including spaces inside them) and order stay exactly the same.

How much smaller does JSON get?

It depends on how it was formatted. Pretty-printed JSON with 2-space indentation typically shrinks by 15–30%; deeply nested documents shrink more.

Should I minify JSON for APIs?

Usually your server's gzip or Brotli compression already removes most of the cost of whitespace. Minifying still helps for JSON embedded in HTML, stored in databases or size-limited fields.

More Developer tools →