ToolStudio.es
In your browser1 Free Trial

JSON minifier online

Strip the spaces, indentation and line breaks from your JSON so it takes up as little room as possible, without changing any data.

Free try: process 1 document (pasted or 1 file) and change the options as often as you like. Errors do not use up your try.
Input · JSON

Everything runs in your browser: your data is never sent to a server.

Result · JSON

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

  1. Paste the JSON or open a .json file.
  2. Optionally, turn on “Sort keys A-Z”.
  3. Click “Minify JSON”.
  4. 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.

Related tools

Development

JSON Formatter

Paste minified or messy JSON and get it back indented with 2 or 4 spaces or tabs, with sorted keys if you want. Any error is shown with its line and column.

JSON
Try this tool
Development

JSON Validator

Validate JSON against the RFC 8259 standard with every error explained in plain words: trailing commas, single quotes, unquoted keys or comments. It also flags duplicate keys.

JSON
Try this tool
Development

JSON to JavaScript Converter

Convert JSON into a JavaScript object literal: unquoted keys where possible, single or double quotes and a const, export default or module.exports declaration.

JSONJavaScript
Try this tool
Featured on TinyShelf