JSON Minifier
Minify and compress JSON by removing whitespace
JSON Input
Minified Output
What Is a JSON Minifier?
Minified JSON has all whitespace removed: no line breaks, no indentation, no spaces between keys and values. The result is a single compact line. APIs often return minified JSON to reduce payload size. Config files and database fields sometimes need the same treatment. A JSON minifier does the opposite of a formatter: it takes readable JSON and compresses it.
This tool runs in your browser. Your JSON is passed through JSON.stringify() with no extra arguments, which produces the minimal output. Nothing is sent to a server.
How to Use This Tool
Paste or Upload
Paste your JSON into the left editor or click Upload to load a file. The Sample button loads example data.
View Minified Output
The right panel shows the minified result automatically. The stats bar displays original size, minified size, and how much was saved. Invalid JSON will show an error.
Copy or Download
Use Copy or Download to get the minified JSON. If you need formatted output again, use the JSON Formatter.
JSON Minification Examples
Minification removes all whitespace. Here are telecom-themed examples:
Formatted input
Minified output
When Minified JSON Is Used
API responses are often minified to reduce bandwidth. When you're building an API, you might minify the JSON you send. When storing JSON in a database column or a URL parameter, the smaller size matters. Build tools and bundlers sometimes expect minified config. The JSON spec allows any amount of whitespace, so minified JSON is still valid.
If you need to read minified JSON, paste it into the JSON Formatter first. For validating syntax before or after minifying, the JSON Validator handles that.
Frequently Asked Questions
Is my data sent to a server?
No. Minification happens in your browser. Check the Network tab to confirm.
Does minifying change the data?
No. Only whitespace is removed. The structure and values stay the same. RFC 8259 defines JSON so that whitespace is insignificant.
How much smaller does it get?
Depends on how much whitespace was in the original. Formatted JSON with 2-space indentation can shrink by 30–50%. The stats bar on the page shows the exact numbers.
Can I minify invalid JSON?
No. The tool parses the input first. If it's not valid JSON, you'll get an error. Fix the syntax with the JSON Validator or JSON Formatter.
What about JSON with comments?
Standard JSON doesn't support comments. If your file has comments (e.g. VS Code settings), remove them first.
Related Tools
For more on JSON, see MDN's JSON guide, the RFC 8259 specification, and json.org. For JSON.stringify, see MDN. For command-line minification of large files, see jq.