JSON Minifier

Paste JSON to strip every space, tab and line break RFC 8259 treats as insignificant, then see bytes in, bytes out and the percent saved. On a 26-document sample corpus the median saving was 27.1%. Pretty-print reverses it with two-space indent. Invalid input shows the first error's line and column. Nothing leaves this tab.

Waiting for input

Runs in this tab · nothing is uploaded · Verify in 10 seconds →

What the JSON Minifier does

A JSON minifier strips every space, tab and line break that JSON does not need, producing the smallest equivalent document. Use it before embedding JSON in a query string, a log line, an environment variable or an HTTP request body.

How the JSON Minifier works

Paste JSON and press Minify. The text is parsed with your browser's JSON.parse, then re-serialized without whitespace. The status bar shows input size, output size and the percentage saved. Pretty-print reverses it with two-space indentation.

~/faq

Frequently asked questions

Does minifying change my data?

No. Only insignificant whitespace between tokens is removed. Strings, numbers, key order and structure stay exactly the same, so the minified document parses to the same value.

How much smaller does JSON get?

It depends on how it was formatted. Pretty-printed JSON with deep nesting often shrinks 20 to 40 percent; already-compact JSON barely changes.

Why does my JSON fail to minify?

The input must be valid JSON first. The error message points at the line and column of the first problem, commonly a trailing comma, a comment, or single quotes instead of double quotes.

Is this the same as compressing with gzip?

No. Minifying removes whitespace but the result is still plain JSON any parser can read. Gzip is binary compression applied on top, servers usually do that automatically.