JSON Minifier

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

JSON Runs in your browser
JSON
Minified JSON

Nothing minified yet

Paste JSON and press Minify to see the single-line result and how many bytes it saves.

Runs entirely in your browser. Your data isn't uploaded — this page makes no network request with anything you type, which you can verify in your browser's network tab. How this works.

What is the JSON Minifier?

Minifying JSON removes every byte that only exists for human readers: indentation, newlines and the spaces after colons and commas. The parsed value is identical, the payload is smaller.

It matters most where JSON is stored or sent repeatedly — cache values, message queue bodies, embedded config, database columns. This tool shows the before and after size along with an estimate of what gzip would achieve, so you can tell whether minifying is worth doing at all.

How to use it

  1. Paste formatted JSON into the editor.
  2. Press Minify (or Ctrl/Cmd + Enter).
  3. Check the size readout to see the raw and estimated compressed saving.
  4. Copy the single-line result, or download it as a .json file.

Example

Formatted JSON collapsed for transport.

Input
{
  "region": "eu-west-1",
  "instances": 4
}
Result
{"region":"eu-west-1","instances":4}

47 bytes → 36 bytes (23% smaller)

Features

  • Removes all insignificant whitespace while preserving values exactly
  • Before/after byte counts with percentage saved
  • Estimated gzip size, so you can see the real network impact
  • Optional removal of null and empty values
  • Validates while minifying — malformed input is rejected, not truncated

Frequently asked questions

Does minifying change my data?
No. Only whitespace outside string literals is removed, so the parsed value is byte-for-byte equivalent once decoded. Whitespace inside strings is untouched.
Is minifying worth it if I already use gzip?
Usually only a little. Repeated indentation compresses extremely well, so gzip already removes most of the cost — typically minifying saves a further few per cent on the wire. It matters far more for uncompressed storage such as a database column or a cache entry.
Why remove null values?
It is optional, and only safe when your consumers treat a missing key and a null the same way. Many APIs do not, so leave it off unless you know the contract.
Esc

Loading the catalog…