Skip to content
Toolbench

JSON Minifier

Strip whitespace to make JSON as small as possible.

Runs entirely in your browser

Loading tool...

How to use

  1. Paste or type JSON into the input panel.
  2. Select Minify JSON.
  3. Check the size comparison to see how much was saved.
  4. Copy the result or download it as a .json file.

Features

  • Removes every byte of insignificant whitespace.
  • Reports original size, minified size and the percentage saved.
  • Whitespace inside strings is preserved, so values never change.
  • Runs entirely in your browser; nothing you paste is uploaded.

Frequently asked questions

Does minifying change my data?
No. The JSON is parsed and re-serialised, so only formatting whitespace between tokens is removed. Spaces inside string values are part of the data and are kept exactly.
Why is the saving smaller than I expected?
Only whitespace can be removed. A document that was already compact, or one dominated by long string values, has little to strip. Gzip on your server will compress it much further.
Is minified JSON still valid?
Yes. Whitespace between tokens is insignificant in JSON, so the minified output parses identically to the original.

Strip comments and whitespace from a stylesheet without touching what is inside a string or a data URI.

Format and beautify JSON instantly.

Find JSON syntax errors and see exactly where they are.

JSON Minifier — Compress JSON Online