- JSON Formatter
- JSON Minify
JSON Minify
Removes all whitespace and line breaks. Same content, smaller file.
Input
The result appears here.
Snippets
Validate against schema
More than 50 MB, many files at once, or an API? That is what Pro is for. See Pro
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
- Paste your JSON into the left field or drop a file onto it.
- Pick the indentation: 2 spaces, 4 spaces or tab. The result shows up on the right straight away.
- 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.