JSON Minifier

Strip whitespace and newlines to cut payload size before you ship.

Runs in your browser — nothing is uploaded

Minified output

About the JSON Minifier

Minifying removes every character that exists only for human readers — indentation, newlines, spaces after colons and commas. The parsed result is identical; only the byte count changes.

Typical savings on an indented document are 15–30%, and more on deeply nested structures where indentation dominates. Over HTTP with gzip or brotli enabled the marginal gain is smaller, since compression already handles repeated whitespace well.

Where it matters most is anywhere the raw string is stored or transmitted uncompressed: database columns, log lines, message queue payloads, URL parameters and localStorage.

FAQ

JSON Minifier — frequently asked

How much smaller will my JSON get?

Usually 15–30% for a document indented with two spaces, and more for deeply nested data where indentation makes up a larger share of the bytes. The page shows the result so you can compare directly. If your transport already applies gzip or brotli, the end-to-end saving will be considerably smaller.

Does minifying change the data?

No. Only insignificant whitespace is removed. Parse the minified output and you get exactly the same values, in the same order, as the original. It is a lossless transformation.

Can I reverse it?

Yes — run the minified string through the JSON formatter to restore indentation. Since whitespace carries no meaning in JSON, nothing is lost in the round trip; you just may not get back the exact original spacing.

Will minifying make my API faster?

Only marginally in most cases. Response time is usually dominated by server processing and network latency, not payload size, and gzip already compresses whitespace effectively. Minification pays off most for large payloads on slow mobile connections, or where responses are stored rather than streamed.

Does it remove comments?

Comments are not valid JSON, so a document containing them will fail to parse before minification even starts. Strip them first if you are working with a JSONC file such as a VS Code settings file.

Is whitespace inside strings preserved?

Yes. Only whitespace between tokens is removed. Spaces, tabs and newlines inside string values are part of the data and are left untouched.

    Report an issue