Input

Output

Formatted result will be displayed here

What does a JSON compressor do?

Compressing JSON means removing all insignificant whitespace between tokens so the bytes on the wire are as few as possible. You end up with a single line where objects and arrays touch their neighbors directly. This matters when JSON is traveling over a slow link, being embedded in a URL, stored in a size-limited database column, or pinned inside a source file as a string constant where every byte counts.

Use Cases

Reduce API payload size

Trim transport bytes on mobile or IoT clients where bandwidth is scarce and every kilobyte has a measurable latency cost.

Embed JSON in source code

Paste a compressed JSON blob into a JavaScript or Go constant and keep the file diff-friendly instead of exploding it over many lines.

Fit into size-capped fields

Some datastores cap metadata columns at a few kilobytes. Minifying first often makes a payload fit without changing its structure.

Prepare for URL encoding

If you have to stuff JSON into a query string, minify first to drop unnecessary bytes before percent encoding inflates it again.

FAQ

How much smaller does JSON get?

It depends on the original formatting, but indented JSON typically shrinks 20 to 40 percent when all whitespace is removed.

Is compressed JSON still valid?

Yes. Whitespace between tokens is optional in the JSON spec, so minified output parses identically to the input.

Does it gzip too?

No. This only removes whitespace. For real compression, send the minified output through gzip or brotli at the transport layer.

Will it strip comments?

JSON does not support comments, so there are none to strip. If your input has JSONC comments, they will cause a parse error.