How to use JSON Minifier
- Paste the JSON you want to compress.
- The minified output appears immediately, with the before and after byte counts.
- Copy the result, or fix the reported syntax error if the input would not parse.
- JSON has no comments. If your file has // or /* */ in it, it is JSONC or JSON5 and will fail to parse here — strip the comments first.
- Integers beyond 2⁵³ lose precision when parsed, because JSON numbers become IEEE-754 doubles. Large IDs should travel as strings.
- Everything runs in the browser, so API responses and config files with credentials in them are never transmitted.
Minifying is parse-then-restringify, not find-and-replace
The tool runs your text through a real JSON parser and re-serialises the result with no indentation. That matters, because a regular expression that deleted whitespace would also delete the spaces inside your string values. It also has consequences worth knowing before you diff the output against the input: key order is preserved, but duplicate keys collapse to the last occurrence, and numbers come back in JavaScript’s canonical form — 1.0 becomes 1, 1e3 becomes 1000, and 0.30000000000000004 stays exactly that. The upside is that the output is guaranteed to be valid JSON.
How much you actually save, honestly
Pretty-printed JSON with two-space indentation is typically 15–30% whitespace, and deeply nested structures with short values are at the high end. But whitespace is the single most compressible thing in a file: once gzip or Brotli has run over it, the difference between minified and formatted JSON is usually a couple of percent. Minifying pays off where the JSON is stored or embedded uncompressed — localStorage quotas, a data attribute in HTML, a database column, an environment variable, the payload of a QR code, a URL fragment.
What it deliberately does not do
It does not shorten or rename keys, strip null or empty values, reorder anything, or change your structure in any way. Minification is purely a change of representation, and it is fully reversible — running the output through the JSON formatter gives you an indented document back. If you need the payload genuinely smaller rather than merely tidier, that is a schema problem: shorter key names, or a binary format such as MessagePack or CBOR.
Frequently asked questions
How much does minification reduce size?
Is minified JSON still valid?
Should I minify production API responses?
Does minifying change my data?
Will minified JSON break my API or parser?
Is it worth minifying if my server already gzips responses?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.