JSON Minifier

Minify JSON to a single line, validate the syntax and see exactly how many bytes you save.

Original size
0 B
Minified size
0 B
Saved
0%
Status
Waiting
No uploads. Your files stay on your device.

Free forever, no sign-up, no cookies. Buy me a coffee

How it works

Paste JSON on the left and the minified version appears on the right instantly: every space, tab, newline and indent between tokens is removed so the JSON collapses to a single line, while the data itself stays byte-for-byte equivalent. The tool parses your input with the browser's own JSON engine, so it also works as a validator — if something is wrong you get the exact line and column of the syntax error instead of a silent failure. Turn on JSONC mode to accept // and /* */ comments plus trailing commas (handy for tsconfig.json style files), and Escape non-ASCII to turn accented and emoji characters into \u escapes for systems that only handle plain ASCII.

Minifying typically shaves 10–30% off a pretty-printed API payload or config file, which means smaller responses and faster parsing. Everything runs in your browser with vanilla JavaScript — your JSON is never uploaded to a server, so it is safe to paste API responses, tokens or customer data. There are no ads and no file size limits beyond what your own device can handle.

Frequently asked questions

How do I minify JSON online?

Paste your JSON into the left box (or load a .json file) and the minified, single-line version appears on the right instantly — there is no button to press. Then use Copy minified JSON or Download .json. The stats panel shows the original size, the minified size and the percentage you saved.

Does minifying JSON change the data?

No. Minifying only removes the whitespace between tokens — spaces, tabs, newlines and indentation. The parsed value stays identical, so any program that read the pretty-printed file reads the minified one exactly the same way. Whitespace inside string values is always preserved.

Is it safe to minify JSON containing sensitive data?

Yes. This minifier runs entirely in your browser with JavaScript: your JSON is never uploaded, logged or stored, so you can safely paste API responses, tokens or customer records. You can even go offline and the tool keeps working.

Report a bug