Skip to content
100% in your browser. Nothing you paste is uploaded — all processing runs locally. Read more →

JSON Minifier

Paste any JSON, get the smallest valid form back. Validates as it minifies — invalid input shows the parse error.

When minified JSON helps

When minified JSON hurts

How much it saves, by example

SourceIndentedMinifiedSavings
OpenAPI 3.0 spec~100 KB~70 KB30%
npm package.json (medium)~3 KB~2 KB33%
GeoJSON FeatureCollection~2 MB~1.4 MB30%
Deeply-nested configvariablevariable40-60%

Minify + gzip is not double savings

A common misconception: minifying before gzip / brotli doesn't multiply. Compression algorithms recognize whitespace patterns and compress them efficiently. Minify-then-compress is typically only 2-5% smaller than indent-then-compress. The decision is about source-level size (where minification dominates), not transport size.

What this tool doesn't do

Programmatic equivalent

// JavaScript / TypeScript
JSON.stringify(JSON.parse(input));

// Python
import json
json.dumps(json.loads(input), separators=(",", ":"))

// jq (CLI)
echo "$INPUT" | jq -c .

// Go
import "encoding/json"
out, _ := json.Marshal(parsed)

FAQ

How much space does minification save?

Typically 20–40% on indented JSON, more on heavily nested or whitespace-heavy files. The status line shows exact byte savings for your input.

Does minification change the data?

No. JSON.stringify(JSON.parse(input)) preserves every value, just removes whitespace. The output is byte-equivalent to the input as JSON values, just smaller.

Should I minify before HTTP transport?

If gzip / brotli are already on your response, the savings from minification are usually under 5% — gzip handles whitespace efficiently. The bigger win is for inline JSON (e.g. in HTML data-* attributes, postMessage payloads, localStorage) where compression isn't applied.

Is it the same as JSON Stringify with no indent?

Yes — JSON.stringify(value) with no second arg produces minified JSON. This page just exposes that with a textarea-friendly UX.