JSON minifier
What the JSON minifier does
Paste any valid JSON, however it's currently formatted, spread across lines, inconsistently indented, already partly compact, and this app parses it and returns the smallest valid representation of the exact same data: no line breaks, no indentation, no unnecessary spaces.
It's local. Parsing and minifying run in your browser, not on a server, so nothing you paste is uploaded and there's no limit on how much JSON you minify.
The underlying fact
Why whitespace in JSON doesn't matter, in plain terms
JSON's grammar treats spaces, tabs and line breaks between its structural characters, braces, brackets, colons, commas, as entirely optional. '{"a":1}' and the same object spread across five indented lines describe exactly the same data to anything parsing it. The formatting exists purely for whoever's reading the file, never for the machine consuming it.
That's exactly what minifying takes advantage of: since none of that whitespace changes the meaning, removing every byte of it produces a file functionally identical to the original but smaller.
Workflow
How to minify JSON in three steps
Nothing to configure, nothing to install.
- Step 1
- Paste your JSON into the input field, whatever format it's currently in.
- Step 2
- Press Minify. The app parses and re-serialises it instantly, on your own device.
- Step 3
- Copy the compact result from the output panel.
Why it matters
What minifying JSON actually saves you
The saving is pure byte count, nothing about the data's structure or meaning changes. For a payload embedded in a URL query parameter, a value stuffed into an environment variable, a script tag's inline data, or a '.min.json' asset shipped to every visitor, every removed byte is one less byte to transmit and parse.
For a small, one-off object the difference is trivial. For a large config file, a sizeable API response used as a fixture, or an asset served to thousands of page loads, the removed whitespace adds up to a real, if modest, reduction in transfer size.
A side effect worth knowing
Why minifying also validates your JSON, and why that matters
To minify anything, this app first has to parse it, which means anything that isn't syntactically valid JSON, a trailing comma, an unquoted key, a comment, gets rejected outright rather than silently mangled. That makes this app a quick validity check as a side effect, even when saving bytes wasn't the point of pasting something in.
A common reason for rejection is pasting JSON5 or JSONC, formats that allow comments and trailing commas and look almost identical to plain JSON. Standard JSON supports neither, so text copied from a config written in one of those relaxed formats fails here until the comments and trailing commas are removed.
Straight answer
Does valid JSON mean correct data?
No, worth being direct about that. This app confirms what you pasted follows JSON's syntax rules, correctly matched braces and brackets, properly quoted keys, no trailing commas. It has no idea whether the values inside are the right values, whether a required field's missing, or whether a number should've been a string.
Syntactic validity and correctness are two different things. Minifying, or its counterpart, pretty-printing, only ever addresses the first.
Who it's for
Who uses a JSON minifier, and when
Developers use it to shrink a config value that has to fit into a single environment variable, a URL parameter or a command-line argument. Front-end engineers use it to compact a small JSON asset before it ships to every page load, when a build tool's own minification step isn't available.
Anyone preparing a JSON payload for a single-line log entry, a database column that doesn't handle line breaks well, or a chat message with a length limit uses it to compress the JSON to one clean line without touching any of the data inside.