Minify JSON Online — Compress to a Single Line
Beautifully format, validate, compress and sort JSON data locally.
🔒 Processed entirely in your browser — nothing you enter here is ever uploaded.
The result appears on this page after you run the tool. Nothing you enter is uploaded.
Result
About this tool
This page opens the JSON formatter with a sample record already loaded and the minify option preselected, so you see a compact, whitespace-free result the moment it loads — paste your own JSON above to compress it the same way.
Minifying JSON removes every non-essential space, tab and line break, collapsing a readable multi-line document down to the smallest valid representation. That matters most for anything shipped over a network or baked into a build: API responses, bundled config files and cached payloads all get smaller and parse marginally faster once the formatting bytes are gone.
Because the process only removes whitespace between tokens, it never changes the data itself — the same keys, values and structure come back out, just packed tighter. If you need the opposite direction later, this same tool pretty-prints with a chosen indent width, so you can toggle between the compact and readable forms of the same document without losing anything.
Example. The text {"b":1,"a":2} with sort keys and 2-space spacing pretty-prints with a before b.
Limit. A trailing comma fails JSON.parse and is not repaired.