JSON Minifier
Strip whitespace from JSON for compact transport. See the byte savings and the compression ratio side-by-side. All in your browser.
Runs in your browser — nothing uploaded
Input
Strip every redundant whitespace byte from your JSON. This tool parses the input and emits the most compact representation that still round-trips through any JSON consumer. Great for cutting payload size in URL parameters, embedded config, log lines, and places where transport compression isn't available.
Private by design — your data never leaves your device
How to use it
No account, no upload — it all happens on your device.
1
Paste your formatted JSON into the input area, or click 'Load sample' for an example.
2
The byte count, savings, and minified output update as you type.
3
Click 'Copy' to put the minified JSON on your clipboard.
4
If anything looks off, the tool reports a parse error so you can fix invalid JSON before minifying.
What gets stripped
Only structurally insignificant whitespace — values are preserved exactly.
- Indentation (spaces or tabs at the start of lines) — biggest savings.
- Line breaks between tokens.
- Spaces around
:and,— small but adds up across large arrays of objects. - Trailing whitespace at the end of lines.
Whitespace inside strings is preserved exactly — those spaces are part of the value, not the syntax.
When minifying matters (and when it doesn't)
- Matters: JSON in URL query strings or fragments, JSON pasted into a config field with a size limit, JSON written to disk uncompressed, JSON embedded in another text format, JSON over WebRTC datachannels and other non-gzipped transports.
- Often doesn't matter: JSON returned over gzipped HTTP. The transport compresses repeated whitespace tokens almost as well as pre-minified JSON, so end-of-wire payload sizes converge.
- Trade-off: minified JSON is harder to read in logs and diffs. Keep formatted JSON in source control and minify at build or runtime if size matters.
If you also want to validate or pretty-print
- Use the JSON Validator to check well-formedness and get error positions.
- Use the JSON Formatter for beautification with configurable indent.
- All three tools are the same underlying parser — they just lead with different jobs.
Frequently asked
How much smaller will minified JSON be?
It depends on how much whitespace your formatted JSON has. A 2-space indented file typically shrinks 20–40%; tab-indented or 4-space files shrink even more. The headline number above shows the exact savings for your input.
Should I minify JSON over the network?
If you control the producer and the wire format, yes — every byte counts at scale. But most production stacks ship JSON over a gzip- or brotli-compressed HTTP connection, and those compressors already collapse whitespace efficiently. Minify when you can't rely on transport compression (small payloads, query strings, embedded blobs) or when you're storing JSON as raw text.
Does my JSON go to a server?
No. Minification is `JSON.parse` followed by `JSON.stringify` — both run entirely in your browser. Your data is never uploaded or stored anywhere.