JSON Minifier Online
Collapse JSON into its smallest valid form and see the exact byte savings. Beautify is one click away when you need the readable version back.
Input
Output
About this tool
Minifying strips every byte a parser does not need: indentation, newlines and the spaces around colons and commas. The data is untouched, so the result parses into exactly the same object — it just travels lighter over the wire and takes less space in a cache, a database column or an HTML attribute. Each run reports the before and after size so the saving is a number, not a guess.
How to use it
- 1Paste the JSON you want to shrink into the input panel.
- 2The compact result appears immediately, with the size saving shown in the status bar.
- 3Press Copy to take it, or Beautify to switch back to an indented view.
Frequently asked questions
›What does minifying JSON actually remove?
Only insignificant whitespace: indentation, line breaks and the spaces after colons and commas. Keys, values, ordering and types stay exactly the same, so the parsed result is identical.
›How much smaller does JSON get?
Typically 15-40% for pretty-printed documents — the deeper the nesting, the more indentation there is to strip. This page shows the before and after size on every run.
›Should I minify if my server already uses gzip?
The win is smaller but real. Gzip compresses repeated whitespace very well, so minifying on top of it usually saves a few percent. It matters most for payloads stored uncompressed, embedded in HTML, or sent over websockets.
›Can I get the formatted version back?
Yes. Minifying is lossless as far as data goes, so pressing Beautify re-indents the same document. Nothing but whitespace was removed.
›How do I minify JSON from the command line?
With jq: jq -c . data.json — the -c flag prints compact output. In Node: JSON.stringify(JSON.parse(input)) does the same thing.