Compress JSON to a single line by removing all unnecessary whitespace. Typically reduces size by 30-60% while preserving exact data. Perfect for API responses, database storage, and embedding JSON in URLs.
Minified JSON will appear here
JSON minification is the process of removing all unnecessary whitespace from a JSON document to produce the smallest valid representation of the same data. Where pretty-printed JSON uses indentation, line breaks, and spaces for readability, minified JSON squeezes everything onto a single line with no whitespace at all.
The data itself is unchanged — every key, value, type, and structural element is preserved exactly. Minification is purely cosmetic: it strips characters that don't affect parsing. A JSON parser produces the same in-memory result whether it reads minified or pretty-printed input.
So why bother? Because whitespace adds up. A typical pretty-printed JSON with 2-space indentation is 40-60% larger than its minified equivalent. With 4-space or tab indentation, the difference is even bigger. For API responses sent thousands or millions of times per day, that translates to real bandwidth, real latency, and real money.
Three steps:
.json file or drag and drop one.The tool also works in reverse — click Expand to convert minified JSON back to pretty-printed form. Use this when you receive a minified API response and want to read it.
Minification helps in any context where JSON is transmitted, stored, or transferred in volume:
Production APIs almost always return minified JSON. With responses going out thousands of times per second, removing 50% of the bytes meaningfully reduces server bandwidth costs and improves response time.
If you store JSON in a database column (PostgreSQL jsonb, MySQL JSON, MongoDB), minification reduces storage size, speeds up reads, and reduces network transfer between database and application.
JSON embedded in URLs needs to fit in the URL length limit (typically 2048 chars). Minify first, then URL-encode, to stay under the limit and keep URLs reasonably short.
Kafka, RabbitMQ, AWS SQS, and similar systems often charge by message size. Minified JSON reduces per-message cost and lets you fit more data inside fixed message limits.
JSON configs embedded in webpack/Vite bundles add directly to your JS bundle size, which slows page load. Minified configs shrink the bundle.
Stripe, GitHub, Slack, and other webhook providers often have payload size limits (256 KB typical). Minification fits more data into a single hook.
The savings depend on your indentation style and how deeply nested your data is:
Some scenarios where pretty-printed JSON is the better choice:
package.json, tsconfig.json, .eslintrc.json — keep these pretty-printed so git diffs show meaningful changes rather than "the whole file changed".jq can reformat on demand.The rule of thumb: minify for production transmission and storage; keep it pretty for development, source control, and documentation.
jq -c . file.json > file.min.json — that's the canonical way to minify large JSON outside a browser.customer_billing_address_line_1 to addr1)? (3) should you compress with gzip/brotli on top?