JSON Minifier
Strip every unnecessary byte out of JSON.
About this converter
Removes the whitespace and gives you back the smallest valid JSON that holds the same data, with the saving shown underneath.
Useful for a config value that has to fit on one line, a fixture being embedded in source, or a payload going somewhere that charges by the byte.
Worth knowing where it does not help: if the JSON is going over HTTP with compression on — which is the normal case — gzip removes repeated whitespace almost entirely by itself, and minifying first buys very little. The gain is real when the JSON is stored uncompressed, embedded in another document, or passed through a system with a size limit.
The data is unchanged. It is parsed and re-serialised, so anything invalid is rejected rather than passed through, which makes this a validity check as well.
Frequently asked questions
Does minifying lose anything?
Only formatting. The JSON is parsed and written back out, so the values and structure are identical. The one thing that does not survive is the original key order in objects — in practice it is preserved, but nothing in the format guarantees it.
Is this worth doing if my server uses gzip?
Usually not much. Compression already handles repeated whitespace very effectively, so minifying before gzip typically saves a percent or two. It matters when the JSON is stored or transmitted uncompressed, or embedded inside another file.
Does what I paste get sent anywhere?
No. The conversion runs in your browser, on your own machine — that is why the result appears as you type rather than after a wait. Nothing is uploaded, nothing is logged, and closing the tab is the end of it. This matters more here than on most pages: tokens, keys and internal data get pasted into tools like this constantly, and most of them are a form that posts to a server.