JSON Minifier Online — Free
Runs 100% in your browser — your files never leave your device.
Readable JSON carries indentation and sometimes JSON5 comments that are unnecessary in payloads or embedded configuration. Paste the source to parse it safely and emit one compact line, rather than using brittle whitespace replacement that could damage string values.
How it works
- 1
Paste JSON or JSON5
- 2
Resolve parser errors
- 3
Copy compact JSON
About this tool
What minifying changes
Minifying strips whitespace — every indent, newline, and padding space that made the JSON readable — leaving valid JSON that is smaller on the wire. Structure, values, and order are untouched; only the presentation goes. Paste, minify, copy: the result parses identically.
Where the bytes matter
API responses ship to every client — whitespace in a chatty JSON payload is pure overhead, often 20–40 percent of the size. Config files and machine-to-machine payloads benefit the same way. Keep the pretty version in source control and minify for deployment.
Minify after validating
Minification assumes valid JSON — a trailing comma or unquoted key surfaces as an error at minify time, which makes the tool an accidental validator. If minify fails, run the JSON through the viewer to find the syntax error first.
Frequently asked questions
How much smaller does JSON get?
Typically 20–40 percent, depending on nesting depth and how short your keys are. Deeply indented files with long key names save the most.
Can I minify a file with comments?
No — JSON has no comments, so they are syntax errors. Strip them first; the minifier will refuse to run on anything non-standard.
Does minifying change key order or values?
No — whitespace only. The minified JSON parses to exactly the same data as the pretty version.