{ }jsonkit
Format
Validate
Convert
Query
Generate

JSON minifier

Strip whitespace and line breaks for the smallest valid payload.
219 B · paste or drop a file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
✓ complete219 B → 160 B0.0 ms

About JSON Minifier

The JSON minifier removes the spaces, tabs and newlines between tokens and gives you the smallest valid JSON on one line. Use it to shrink a request body, inline JSON into an environment variable, or check the real wire size of a payload.

The status bar shows the byte count before and after. Runs in your browser. Nothing is uploaded.

How it works

What gets removed

Minifying strips indentation, newlines and the spaces after colons and commas. Whitespace inside string values stays, because it is part of the data.

The data stays the same

Keys, strings and escaped characters come through unchanged. The output parses to the same data as the input. Pretty-print it again and you get an equivalent document.

See the size you save

The status bar shows input and output byte counts. That output number is what travels over the wire before compression.

Invalid input is caught first

The minifier parses before it compacts. Malformed JSON is reported with a line and column instead of turning into a broken one-liner.

Frequently asked questions

Is minified JSON still valid?

Yes. Minifying only removes whitespace between tokens. Any parser reads the result as the same data.

Will minifying break strings that contain spaces?

No. Whitespace inside string values is always kept. Only the whitespace around the structure is removed.

How much smaller will my JSON get?

It depends on how deeply nested and indented the input is. Pretty-printed documents often shrink 20-50%. The status bar shows the exact before and after byte counts.

Is my data uploaded to minify it?

No. Minification runs in your browser, so it is safe for secrets and production data.

Can I get the readable version back?

Yes. Paste the minified output into the JSON formatter to pretty-print it again.

Sources & last verified

We checked this tool's behavior and the claims on this page against the specifications below on . The tool runs in your browser, so the output you see is exactly what the engine produced.

Found a wrong result or an outdated claim? Report an error and we will check it again.