JSON Minifier
Compress JSON to its smallest valid form — strip whitespace and line breaks entirely in your browser.
Use the tool ↓Your data is processed locally in your browser and is not uploaded to our servers.
About this tool
Pretty-printed JSON — the kind with two-space indentation and a line break after every property — is formatted entirely for human readers. A parser doesn't care about any of that whitespace; it's overhead that exists purely so a person can scan the structure visually. Minifying removes it: every unnecessary space, tab, and line break is stripped, leaving the smallest sequence of characters that still parses to the exact same data.
That size difference is not cosmetic when JSON is actually traveling somewhere — an API response body, a config file bundled into a build, a payload cached in local storage or a CDN edge. Every stripped byte is one less byte to transmit, parse, and hold in memory, and for JSON that's deeply nested or has long property names repeated across many array items, formatting overhead can add up to a meaningful fraction of the total payload size. This tool shows exactly how much: after minifying, a savings figure compares the original and minified byte counts so the benefit isn't just theoretical.
Minifying is deliberately a pure whitespace operation here — it doesn't rename keys, reorder properties, or restructure the data in any way, which matters because minified JSON still needs to be exactly equivalent to the original when parsed back. The only thing that changes is how many bytes it takes to say the same thing. This is different from a general-purpose compression scheme (gzip, brotli) that a server might apply on top afterward — minification and compression are complementary, not substitutes for each other, and combining both typically gives the smallest result.
Everything runs through your browser's native JSON parser and serializer — the same one used for formatting elsewhere in this hub — so minifying and formatting are two faces of the identical underlying operation, just with a different amount of whitespace added back in. Nothing you paste or upload is sent to a server.
How to use it
Paste or upload pretty JSON
Indented, readable JSON works exactly as well as a single-line blob.
Read the minified result
The compact output appears instantly, along with a byte-savings figure.
Copy or download
Copy directly, or download as a .json file ready for production.
Example
{
"name": "Nesake",
"tools": 26,
"categories": [
"JSON",
"Security"
]
}{"name":"Nesake","tools":26,"categories":["JSON","Security"]}Common use cases
Reducing API payload size
Strip formatting from a hand-written JSON payload before shipping it.
Config files for production
Minify a config bundled into a build to shave a few bytes off the output.
Embedding JSON in other files
Compress JSON before inlining it into HTML, a script tag, or a URL parameter.
Cache and storage efficiency
Minify JSON stored in localStorage or a cache to save space.
Preparing test fixtures
Produce a compact fixture file matching what a real minified API response looks like.
Quick size comparison
See exactly how much formatting overhead a given JSON document carries.