JSON Minifier

Remove unnecessary whitespace from JSON. Keep values intact and compare the input and output sizes in bytes.

Files up to 2 MiB. Pasted text up to 2,097,152 characters. Maximum nesting: 256 levels.

Download JSON

Your JSON is processed in your browser and is not uploaded to ToolPixels. It is not saved by this tool.

How to use it

  1. Paste JSON or open a local JSON file.
  2. Select Minify JSON. Invalid input must be corrected first.
  3. Copy the compact result or download minified.json.

What gets removed

Minification removes spaces, tabs, and line breaks outside strings. Spaces inside strings, number precision, escape sequences, key order, and duplicate keys stay intact. This is whitespace reduction, not file compression or canonical JSON.

JSON requires double quotes. Comments, trailing commas, undefined, NaN, and Infinity are not valid JSON. Error positions count from 1; columns use UTF-16 text positions. Very large numbers may exceed the range supported by other software.

Related JSON tools