JSON Minifier

Minify JSON online — strip every unnecessary space and newline to shrink payloads for APIs, config files, and storage. See exactly how many bytes you saved.

100% in your browser — your code never leaves this tab. No sign-up, no limits.

JSON Minifier

JSON Input

Paste JSON, drop a file, or

Minified JSON
Output updates live as you type

JSON Minifier — Frequently Asked Questions

JSON size becomes interesting at scale rather than in isolation. A response that is two kilobytes larger than it needs to be is invisible once; multiplied by a million requests a day it is real bandwidth, and on a slow mobile connection it is measurable latency for a user waiting on that response. The same applies to storage — JSON kept in a cache or a database column is paid for on every read. The judgement is simply whether a payload is read by machines at volume or by a person occasionally.

Minification only removes formatting. The larger reductions come from sending less: returning only the fields a client needs rather than whole records, paginating instead of returning everything, avoiding the deeply nested envelopes that repeat the same keys thousands of times in an array, and letting the transport layer compress with gzip or Brotli — which usually saves more than minification and costs you nothing in readability. Reach for those first, and treat whitespace removal as the finishing touch.

It depends almost entirely on how deeply nested the data is, because indentation is what gets removed. Deeply nested, pretty-printed JSON can shrink by 50% or more; a flat object with long string values will barely change, since the strings dominate the byte count. The number under the output is the real measurement for your file. Bear in mind that gzip and Brotli compress repeated indentation extremely well, so the difference on the wire is much smaller than the difference on disk.

Where the same payload moves many times or is stored at scale. Request and response bodies in a high-traffic API, values held in a cache or a database column, messages on a queue, and data embedded in an HTML page all benefit from being compact. It matters much less for something read by a person — a checked-in config file, a fixture, a manifest — where the readability of a formatted file is worth far more than a few hundred bytes.

No. A config file is read and edited by people, and it lives in version control where formatting has real value: a formatted file produces a diff showing the one line that changed, while a minified file produces a single enormous changed line that tells a reviewer nothing. The size saving is irrelevant for a file nobody downloads at scale. Keep repository JSON formatted, and minify only what is transmitted or stored in bulk.

No. Only whitespace between tokens is removed, which JSON parsers ignore entirely, so the parsed result is identical — same keys, same values, same types, same order. Numbers are not reformatted and strings are untouched, including any whitespace inside them, since whitespace within a string value is part of the data rather than formatting.

No. Every tool runs in your browser as JavaScript — your data is never uploaded, never logged, and never sent to a server. You can confirm it by watching the Network tab in devtools while you work, or by disconnecting from the internet after the page loads and seeing that everything still functions. That matters for JSON in particular, because API responses routinely contain personal data, tokens, and internal identifiers.

Customer Reviews

0 out of 5 stars

Based on 0 reviews

Review data

5 star reviews

0%

4 star reviews

0%

3 star reviews

0%

2 star reviews

0%

1 star reviews

0%

Share your thoughts

If you've used this tool, share your thoughts with other users

Recent reviews

Latest Articles

Tips, guides, and insights from our blog