Minifying is a parse-and-restringify round-trip using the browser's own JSON engine, so the compact output is guaranteed to be the exact same data your code will read back - no comments to lose, no keys reordered by hand, nothing to break. The size readout counts real UTF-8 bytes, not characters, so a payload full of emoji or accented text reports the true weight it will have over the wire.
Free JSON Minifier
Runs entirely in your browser - no upload, no sign-up.
What does a JSON minifier do?
A JSON minifier strips every space, tab and line break that a JSON document does not need, collapsing it into one compact line. The data stays identical - only the formatting whitespace goes - so the file gets smaller and loads faster. Paste your JSON here and it minifies live, showing the byte count before and after and the percentage saved.
How to use
- 1Paste your JSON. Drop formatted, pretty-printed or hand-written JSON into the input box.
- 2See it minified live. The compact single-line version appears instantly, and the status bar confirms the JSON is valid or points to the first error.
- 3Check what you saved. The size readout shows the bytes before and after and the percentage removed, so you know exactly how much lighter the file is.
- 4Copy the result. Copy the minified JSON and paste it wherever a compact payload is needed.
Who it's for
- Frontend developers shrinking a bundled config or i18n file so pages ship fewer kilobytes.
- API and backend engineers compacting a request or response body before sending it over the network.
- DevOps and data work - flattening a large JSON blob to store or log it on a single line.
- Anyone pasting JSON into a URL, a database field or an environment variable where a one-line value is required.
FAQ
Is the JSON minifier free?
Yes - it's completely free, with no sign-up and no usage limits. It runs entirely in your browser.
Is my JSON uploaded anywhere?
No. Your JSON is parsed and minified locally in your browser and is never sent to a server, so it's safe for private API keys, tokens and internal data.
Does minifying change my data?
No. Minifying only removes the spaces, tabs and line breaks between elements. Every key, value, number and string - including spaces inside strings - is preserved exactly, so the parsed data is identical to the original.
How much smaller will my JSON get?
It depends on how it was formatted. Pretty-printed JSON with deep nesting can shrink 40-70% because it carries a lot of indentation, while already-compact JSON may barely change. The tool shows the exact bytes saved and the percentage for your file.
What if my JSON is invalid?
The minifier validates as you type. If the JSON has a trailing comma, single quotes, an unquoted key or a missing bracket, the status bar names the problem - and, where the browser reports a position, points to the line and column - so you can fix it before minifying.
Does it work offline?
Yes. Once the page has loaded, the minifier keeps working with no connection because all the processing happens on your device.