sangsen

JSON Minifier

Compact valid JSON by removing unnecessary whitespace.

Output

Result appears here.

How it works

Paste JSON into the input box. It is parsed and re-serialized without extra whitespace entirely in your browser — nothing is sent to a server — producing the smallest valid JSON representation, or a plain explanation of the problem, with the parser’s own message underneath, if the input is invalid.

Example

Pretty → minify
{ "a": 1, "b": [ 2, 3 ] }{"a":1,"b":[2,3]}

FAQ

Is my JSON uploaded anywhere?
No. Minifying happens in your browser via JSON.parse/JSON.stringify — nothing you paste ever leaves your machine.
Does minifying change the data?
No — it only removes insignificant whitespace. The parsed value is identical to the original.
What happens if my JSON is invalid?
You get a plain description of what is wrong, and the line and column to look at, instead of a minified but incorrect result.