JSON Minifier
JSON input
Minified output
Other tools in Developer Tools
About JSON Minifier
Minifying JSON strips out every character that doesn't carry actual data — indentation spaces, line breaks, and the extra space after colons and commas that a formatter adds for human readability. None of that whitespace has any meaning to a JSON parser, so removing it produces functionally identical data in a smaller payload, which matters whenever JSON is being transmitted over a network or stored where size has a real cost.
This shows up constantly in real infrastructure work: shrinking a configuration file or API response fixture before committing it to a repository, reducing the payload size of data embedded directly in an HTML page (like initial state passed to a JavaScript framework), or preparing JSON for a system with a strict size limit, like a URL query parameter or certain webhook payloads. It's also just useful for anyone who wants to see, concretely, how much of a formatted JSON file's size is actually just whitespace versus real data.
This tool uses the same parse-then-serialize approach as the JSON Formatter, just with no indentation argument passed to the serializer, which produces the most compact valid representation possible: no spaces, no line breaks, minimal punctuation. Because minifying requires successfully parsing the input first, it also validates your JSON as a side effect — invalid JSON will show a clear parser error instead of a partial or broken minified result.
The tool also reports the exact size difference in bytes and as a percentage, so you get a concrete, quantified sense of the savings rather than just an visually smaller-looking block of text — useful for justifying whether minification is even worth doing for a given file, since the savings scale with how much whitespace and nesting the original had.
How it works
- Paste your formatted JSON. Enter JSON with any amount of indentation or line breaks.
- See the minified result. A single-line, whitespace-free version is generated instantly.
- Check the size savings. The exact byte reduction and percentage are shown for reference.
Examples
Minifying formatted JSON
Input
{
"name": "ToolsForge",
"free": true
}Output
{"name":"ToolsForge","free":true}