JSON Minifier
Strip whitespace from JSON to make it as small as possible.
JSON Minifier
Developer tool running locally in browser
What does JSON Minifier do?
Remove every unnecessary space, tab and line break from JSON so it takes the least bandwidth. The tool reports the byte saving and validates the input first, so you never minify something broken.
How to Use JSON Minifier
- 1Paste your JSONFormatted or already compact.
- 2MinifyWhitespace outside strings is removed.
- 3Check the savingThen copy the compact result.
Key Features
- Removes all insignificant whitespace
- Validates before minifying and refuses to output invalid JSON
- Original and minified sizes with the percentage saved
- Optional key sorting for reproducible output
- One-tap copy and download
Frequently Asked Questions
How much smaller does minifying make JSON?
Typically 10–30% for pretty-printed JSON, depending on nesting depth. Deeply indented documents save more because each level adds spaces to every line.
Does minifying matter if I use gzip?
Less than you would think — gzip compresses repeated whitespace extremely well, so the transferred difference is small. Minifying still reduces memory and parse time, which matters on large payloads.
Does whitespace inside strings get removed?
No. Only whitespace between tokens is removed. Spaces inside string values are meaningful data and are always preserved.
Can I reverse minification?
Yes. Nothing is lost, so running the result through the JSON formatter restores readable indentation.
Input is processed in your browser and never transmitted. That said, treat any web page as untrusted for live production secrets — rotate anything you paste anywhere.
Related Tools
JSON Formatter
Format, validate and explore JSON with precise error reporting.
JSON Validator
Check whether JSON is valid and get the exact error position.
CSS Minifier
Compress CSS by stripping whitespace and comments.
HTML Minifier
Compress HTML by removing safe whitespace and comments.
