What does minifying JSON mean?
JSON formatted for humans is full of spaces and line breaks that add nothing for the program reading it. Minifying removes all of them and leaves the JSON on a single line.
The result holds exactly the same data but is smaller: fewer bytes to send in an API request, store in a database or ship in a web page. The tool shows you the size before and after and the percentage you saved.
Numbers and strings are copied exactly; only the whitespace outside quotes disappears. If the JSON has an error, you see which line it's on before minifying.
How to minify JSON
- Paste the JSON or open a .json file.
- Optionally, turn on “Sort keys A-Z”.
- Click “Minify JSON”.
- Copy the result or download it as a .min.json file.
When to use it
- Shrinking JSON that's sent with every request.
- Pasting JSON on a single line into an environment variable or a text field.
- Storing config data or website translations with less weight.
- Comparing two JSON documents without formatting differences getting in the way.
Frequently Asked Questions
How much smaller does JSON get when minified?
It depends on how much indentation it had. JSON formatted with 2 or 4 spaces usually shrinks quite a bit; JSON that was already on one line, hardly at all. The tool shows you the exact percentage.
Does minifying change the data?
No. It only removes spaces and line breaks outside strings. Any program reading it gets exactly the same data.
Is minifying the same as gzip compression?
No. Minifying removes unnecessary characters and the result is still JSON any program can read. Gzip or Brotli compress the file, which then has to be decompressed; web servers usually apply them on top of minification.
Is my data sent to a server?
No. Everything is processed in your browser with JavaScript. The text you paste and the files you open never leave your device, so you can safely work with internal or customer data.
Is it free?
Yes. You can try the tool for free on one document (pasted or a single file) and change the options as often as you like; attempts that end in an error don't use up your free try. For unlimited use and processing several files at once, ToolStudio Pro costs €1.99 a month and includes every tool.