Skip to content

JSON Minifier

Removes all unnecessary spaces and line breaks from JSON to make it as small as possible.

Your JSON stays on this device

This tool runs entirely inside your web browser. Your JSON is processed on your own device and is never sent to our servers. How this works

Minified JSON

JSON Minifier is a free tool that removes every unnecessary space, tab and line break from JSON, producing the smallest valid version on a single line. It runs in your browser, so your data is never uploaded, and it shows how many bytes you saved.

How to minify JSON

  1. Paste your JSON into the left box, or open a .json file.
  2. The minified result appears on the right, with the size before and after underneath.
  3. Copy it, or download it as data.min.json.

To go the other way and make minified JSON readable again, choose an indentation option above the result, or use the JSON Formatter.

Example

{
  "name": "Ana García",
  "roles": ["admin", "editor"],
  "active": true
}

becomes the equivalent one-line JSON:

{"name":"Ana García","roles":["admin","editor"],"active":true}

Notice that the space inside "Ana García" is kept: only whitespace between values is removed.

When minifying JSON helps

What it won’t do

Minifying only removes whitespace; it doesn’t shorten property names or remove data. If your JSON is invalid, the minifier shows the error and its position instead of producing output, because guessing how to fix broken JSON could change its meaning.

Frequently asked questions

Does minifying change the data?

No. Only whitespace between values is removed. Spaces inside text values are kept, and numbers are copied exactly, so the minified JSON means exactly the same thing.

How much smaller will my JSON get?

It depends on how it was indented. Pretty-printed JSON typically shrinks by 10–30%. The size before and after is shown under the result.

Should I minify JSON before sending it from an API?

Usually your server’s gzip or Brotli compression already removes most of the benefit. Minifying helps most for JSON embedded in files, URLs, environment variables or databases.

Last updated

Missing a feature, or need a tool we don’t have? Suggest it.