JSON Minifier

Strip whitespace from JSON and see how many bytes you saved.

JSON

Minified

Formatted JSON appears here as soon as you paste it.
Runs on this device. Nothing is uploaded.

About the JSON Minifier

Remove every space and line break from JSON to make it as small as possible for an API payload, a config value or a URL parameter. The minifier parses the JSON first, so the output is guaranteed to be valid and equivalent, and it shows the bytes saved.

How to use it

  1. Paste formatted JSON.
  2. The minified version appears on the right with the size saved.
  3. Copy it.

Example

Input
{ "id": 7, "ok": true }
Result
{"id":7,"ok":true}

Questions

Does minifying change the data?

No. Only whitespace between tokens is removed; spaces inside strings are kept.

How much smaller does JSON get?

Typically 10–30% for JSON indented with two spaces, more for deeply nested data or tab-indented files.

Should I minify JSON sent over HTTP?

If your server compresses responses with gzip or Brotli, minifying adds only a little. It still helps for stored data and size-limited fields.

Related tools