Paste valid JSON into the input panel and select Minify. The result removes indentation and unnecessary whitespace between tokens while retaining spaces inside strings. Try the object below and compare the complete output before copying it. You can download the compact document when you need a file instead of clipboard text. Keep the readable original separately if you expect to edit it later.
Upload a file instead of pasting when the document is large. The upload accepts 100MB and warns above 10MB; that limit does not guarantee that your device has enough memory for every accepted document. Parsing and serialization can normalize number spellings and discard duplicate object keys. Do not use this operation to preserve an exact signed byte sequence.
Input:
{
"label": "two words",
"count": 2
}
Output: {"label":"two words","count":2}
It parses JSON and serializes a compact representation without indentation. Whitespace inside strings remains data. The result can be smaller than a formatted input, but no percentage reduction is guaranteed. Already compact documents may change little. Keep a readable original when people will maintain the source, and inspect the exact output before replacing it.
Parsing and serialization can normalize number spellings and collapse duplicate object keys. Do not use minification to preserve signed bytes or source presentation exactly. Invalid JSON must be corrected before the operation succeeds. Compare parsed values and retain the original when exact numeric representation or duplicate-key diagnostics matter to your application.
Minify JSON for API responses, config files in production, storing data in databases, and reducing bandwidth in network transfers. Don't minify JSON that humans need to read — use a formatter instead.
The file upload accepts 100 MiB and warns above 10 MiB. Input and output still occupy browser memory, so accepted size does not guarantee completion on every device. Try a representative smaller document first when the source is large or deeply nested.
No. Minification removes formatting whitespace. Compression (gzip/brotli) uses algorithms to encode data more efficiently. For best results, minify first, then compress. Most web servers apply gzip automatically on top of minified JSON.