JSON minifier
Minify JSON to a single line in your browser. Validates with JSON.parse, optional key sort. Nothing is uploaded.
Paste JSON, then Minify.
How to use the JSON minifier
- Paste JSON or open a .json file.
- Click Minify. Invalid JSON is rejected; trailing commas belong on the fixer first.
- Copy the one-line payload into an API client, log field, or environment variable.
When to minify
Pretty JSON is for reading. Minified JSON is what most APIs send and what fits in a single log line or secret store. This page only stringifies after a successful parse, so the data is unchanged besides whitespace and optional key order.
Nothing is uploaded
Minify runs in this tab with JSON.parse and JSON.stringify. Typical payloads up to 1.5 MB. Repair comments or single quotes on the JSON fixer first.
JSON minifier FAQ
Does minify change values?
No. Only whitespace is removed unless you also sort keys.
Why did minify fail?
Strict JSON rejects trailing commas, comments, and unquoted keys. Fix those, then minify.
Pretty-print instead?
Use the JSON formatter when you want indentation back.