About Minify JSON
Use the JSON minifier online when you need a compact configuration or payload. It can remove whitespace from JSON outside string values after parsing the document. Spaces inside strings are data and remain in the output.
How to minify a JSON document
- Paste a valid JSON value or document.
- Select Process to parse and serialize it without indentation.
- Review the compact result and download minified.json.
A practical example
- Input
{ "message": "hello world", "count": 2 }- Result
{"message":"hello world","count":2}
The space inside hello world is preserved because it belongs to a string value.
Supported input and limitations
- This is JSON serialization, not gzip, Brotli, or a binary compression format. The input limit is 5 MB.
- The normal JavaScript JSON numeric and duplicate-key limitations apply. Invalid JSON is rejected rather than repaired.
Processing happens on your device. Read about local processing and optional workspace recovery.
Frequently asked questions
Does JSON minification remove spaces inside strings?
No. Only formatting whitespace outside parsed string values is removed by compact serialization.
Can I restore indentation after minifying JSON?
Yes. Send valid compact JSON to Format JSON. Original whitespace choices are not recoverable, but new indentation can be applied.