JSON Minifier

How it works
Indent
Valid JSON

Input JSON

No problems found. This is valid JSON.

About JSON Minifier

Indentation makes JSON readable, but it also adds bytes. Minifying strips every space and line break that is not inside a string, giving you the smallest valid JSON for the same data.

This is useful when you send JSON in an HTTP request, store it in a database column or environment variable, or paste it into a single-line field. The JSON is validated first, so you never minify something that is already broken.

How to use it

  1. Paste your JSON into the Input panel. The Minify switch is already on.
  2. Check the status badge says Valid JSON. If not, fix the errors listed in Problems.
  3. Copy the one-line result, or Download it as a .json file.
  4. Turn Minify off at any time to see the indented version again.

Frequently asked questions

Does minifying change any values?

No. Only whitespace outside strings is removed. Spaces inside string values are kept.

How much smaller will my JSON get?

It depends on how deeply it is nested. Indented JSON often shrinks by 10–30%, and more when it uses 4-space or deep indentation.

Can I turn minified JSON back into readable JSON?

Yes. Paste the minified JSON and switch Minify off, or use the JSON formatter.

Related tools