Skip to content
Mediawand

JSON Minifier

Shrink JSON for an API payload, a config value or a smaller file. All the spacing and line breaks that only help people read it are removed, while the data stays exactly the same.

How to minify JSON

  1. 1Paste your JSON or open a .json file.
  2. 2The minified JSON appears straight away.
  3. 3Copy it or download it as a .json file.

Only whitespace is removed

Keys, values and their order are unchanged, and spaces inside strings are kept. Turn on “Sort keys A to Z” if you also want a predictable key order.

Validated at the same time

Invalid JSON can't be minified safely, so you see the error and where it is instead.

Going the other way

Switch the output to Format to make minified JSON readable again, with 2 or 4 spaces or tabs.

Frequently asked questions

Is my data uploaded?
No. Everything runs in your browser, so the JSON never leaves your device.
How much smaller does it get?
It depends on how it was indented; nicely formatted JSON often shrinks by 20–40%.
Is minified JSON still valid?
Yes. Whitespace between values is optional in JSON, so the result means exactly the same thing.

Related tools

Loading tools…