JSON Minifier
Parse JSON and emit a compact single-line document. Invalid JSON is rejected unless repair is on.
Rated 4.7 out of 5 based on 512 reviews
How to minify JSON
- Paste JSON.
- Turn on Repair if the paste is almost JSON but not strict.
- Copy the compact output if parsing succeeds.
JSON minification
Whitespace removal after a successful parse
| Output | JSON.stringify with no indent |
|---|---|
| Repair | Optional: comments, trailing commas, single quotes, unquoted keys |
| Strings | String values stay the same. Only whitespace outside strings is removed |
Minify versus format
Minify shrinks transfer size. Format makes JSON readable. Both need a successful parse first. See the JSON formatter.
What minify does not change
Minify does not shorten string values, rename keys, or drop fields. It only removes whitespace outside strings after a successful parse. Turn on Repair if the paste includes trailing commas or comments.
Minifier questions
Does minify shorten string values?
No. Only whitespace outside strings is removed.
Is my JSON uploaded?
No. Parsing happens in the page you opened.
What if parsing fails?
The output clears and the status shows the parser message. Turn on Repair for trailing commas, comments, single quotes, and unquoted keys.