JSON Minifier
Parse valid JSON and reserialize it without formatting whitespace.
How to use
- Enter JSON and run to obtain the compact form.
Capabilities and scope
This is structural minification after JSON.parse, not blind whitespace deletion.
How it works
The implementation is JSON.stringify(JSON.parse(input)).
Example
Pretty JSON becomes a compact string such as {"a":1,"b":2}.
Useful for
- Reduce formatting overhead for JSON storage or transfer
Before you use it
- Whitespace inside string values is preserved and invalid JSON cannot be minified.
Frequently asked questions
Are spaces inside strings removed?
No. Only formatting whitespace outside JSON string content is removed.