JSON Minifier
Compress JSON by stripping every unnecessary space, tab and line break — free and instant. Your data is validated and minified right in your browser and never uploaded anywhere.
How to use the JSON Minifier
- Paste your JSON. Drop any JSON document into the input box — an API response, a config file or a data export.
- Click "Minify JSON". The tool first validates the document, then removes every space, tab and newline that is not inside a string. Invalid JSON is reported with the exact line and column of the error.
- Copy or download the result. Use the copy button to grab the compact JSON, or download it as a .json file. The size stats show exactly how many bytes you saved.
About this tool
Minified JSON is byte-for-byte equivalent to the original — whitespace between tokens carries no meaning in JSON, so removing it changes nothing about the parsed data. Because this minifier works on the raw text rather than re-serializing the document, your keys, string values and even unusual number literals such as very long integers are preserved exactly as written. That makes it safe for API payloads, package manifests, localization files and any other JSON you need to shrink before shipping. Smaller payloads mean faster transfers and lower bandwidth bills, which is why production APIs almost always serve compact JSON.
Everything happens locally in your browser: the JSON you paste is never uploaded, logged or stored, so it is safe to minify configuration files that contain API keys or other private data. If you need the opposite — pretty-printing compact JSON so humans can read it — try our JSON Formatter.
Frequently asked questions
Does minifying change my data in any way?
No. Only whitespace outside of string values is removed. Keys, strings, numbers, booleans and nulls are kept exactly as they appear in the input, so the minified document parses to precisely the same data as the original.
How much smaller will my JSON get?
It depends on how it was formatted. Pretty-printed JSON with 2- or 4-space indentation typically shrinks by 15–40%. Deeply nested documents with short keys benefit the most, since indentation makes up a larger share of the file.
What happens if my JSON is invalid?
The tool validates the document before minifying and shows a clear error message including the line and column where parsing failed — for example a trailing comma, a single-quoted string or a missing bracket. Fix the issue and minify again.
Is my JSON uploaded to a server?
No. Validation and minification run entirely in your browser with JavaScript. Your data never leaves your device, so confidential payloads and files containing secrets are safe to paste here.