How to Minify JSON Online (and When You Should)
Updated
Minifying JSON removes every character the parser doesn't need — indentation, line breaks, and spaces between tokens — producing the smallest text that still represents exactly the same data. For pretty-printed documents, that's typically a 20–40% size reduction before compression even starts.
One click in the Advanced JSON Toolkit minifies any document up to 10MB, entirely in your browser.
Step-by-step
Open the JSON minifier
Go to the Advanced JSON Toolkit homepage.
Add your JSON
Paste it, upload a .json file, or load it from a URL. The document must be valid — the toolkit validates instantly and pinpoints any error first.
Click Minify
All insignificant whitespace is stripped in place. The data itself — keys, values, order, escaping — is unchanged.
Copy or download
Copy the minified output to your clipboard or download it as a .json file.
What minification does and doesn't do
Minification only removes whitespace outside of strings. Whitespace inside string values is data and is always preserved. Minified and beautified versions of a document parse to identical results in every standards-compliant parser.
{
"user": {
"id": 42,
"name": "Ada Lovelace"
}
}{"user":{"id":42,"name":"Ada Lovelace"}}When minifying is worth it — and when it isn't
Minify JSON that ships over the network or into storage: API responses, config bundles, localStorage payloads, files embedded in app builds. Smaller text means faster transfer and less memory, and it compounds with gzip or brotli compression.
Don't minify JSON that humans maintain — config files in a repo, fixtures, documentation examples. Readability is worth far more there than bytes, and version-control diffs of one-line JSON are unreviewable. Keep the source pretty-printed and minify at build or response time.
Minification vs compression
Minification and HTTP compression (gzip/brotli) are complementary, not alternatives. Compression already collapses repeated whitespace well, so minifying a compressed payload saves less than the raw 20–40% — but it still saves parse time, memory, and bytes on any path where compression isn't applied. For maximum effect, do both.
Try it now
Paste your JSON into the free toolkit — validate, beautify, minify, and explore it without your data ever leaving the browser.
Open the JSON ToolkitFrequently asked questions
Does minifying JSON lose any data?
No. Only whitespace outside of string values is removed. The minified document parses to exactly the same result as the original.
How much smaller does minified JSON get?
Typically 20–40% smaller than pretty-printed JSON, depending on nesting depth and indentation. Combined with gzip or brotli, total savings are even larger.
Can I un-minify JSON back to readable form?
Yes — minification is fully reversible in terms of structure. Paste minified JSON into the toolkit and click Beautify to restore standard 2-space-indented formatting.