Minify JSON to the Smallest Valid Size
Turn pretty-printed JSON into a single compact line for API payloads, config embeds or storage. The tool validates the input first, so the minified output is always valid JSON.
Runs in your browserFree · No sign-up
How to minify JSON
- Paste formatted JSON, click Sample, or open a .json file up to 20 MB.
- The minified version appears in the output box immediately; syntax errors are shown with the line and column.
- Compare the original and minified sizes and the percentage saved.
- Copy the result or download it as minified.json.
Supported formats
- Input
- JSON, .json file
- Output
- Minified JSON
- Maximum size
- 20 MB per file (limited by your device's memory)
Benefits
- Reports exact UTF-8 byte sizes before and after, not just character counts.
- Rejects invalid input instead of producing broken output.
- Keeps string contents untouched — only whitespace between tokens is removed.
Limitations
- Gzip or Brotli compression on your server usually saves far more than minification alone.
- Integers beyond about 9 quadrillion lose precision when re-serialised, because JavaScript numbers are 64-bit floats.
Privacy and security
Parsing and minification happen with JSON.parse and JSON.stringify in this tab. Nothing is uploaded.
Read our privacy policy for details about the site as a whole.
Frequently asked questions
Does minifying change my data?
No. Only insignificant whitespace is removed. Key order, array order and all values stay the same (apart from the large-integer precision caveat).
How much smaller will my file get?
It depends on the indentation. Deeply nested JSON indented with 4 spaces often shrinks by 20–40%; JSON that is already compact will barely change.
How do I make minified JSON readable again?
Paste it into the JSON Formatter, which re-indents it with 2 spaces, 4 spaces or tabs.