Tools
EN
  1. JSON Formatter
  2. JSON Minify

JSON Minify

Removes all whitespace and line breaks. Same content, smaller file.

Input

Drop the file here
Your data never leaves your browser

The result appears here.

Minified JSON saves bandwidth and storage, for example in API responses, in configuration that has to fit into an environment variable, or in database columns. Heavily indented files typically shrink by 20 to 40 percent.

The tool validates the JSON first. Invalid JSON is never minified silently. You get the error position instead.

How it works in 3 steps

  1. Paste your JSON into the left field or drop a file onto it.
  2. Pick the indentation: 2 spaces, 4 spaces or tab. The result shows up on the right straight away.
  3. Copy it, save it as .json or share it as a link. If the tool reports errors, "Auto-fix" repairs the usual ones in one click.

Frequently asked questions

Does minifying lose anything?

No. Only spaces, tabs and line breaks outside of strings disappear. Values and order stay untouched.

Minify or gzip?

Ideally both. Minifying removes what nobody needs, gzip or Brotli compresses the rest in transit.

How do I undo minification?

With the JSON Formatter. It puts indentation and line breaks back.

Related JSON tools