⭐ 0

JSON Minifier Online

Minify CSS, JavaScript, HTML or JSON in the browser: strip comments and whitespace, see the size saved instantly.

Processed entirely in your browser — nothing you enter here is ever uploaded.

Processing... 0%

Result

About this tool

This page opens the code minifier with JSON preselected. JSON minification is the most reliable of all: the tool parses your document with the browser's native JSON parser and re-serializes it without any whitespace — so the output is guaranteed valid, byte-exact JSON with identical data.

Parsing first also means validation for free: if your JSON has a trailing comma, an unquoted key or a broken string, you get the exact parser error instead of a silently corrupted file. Pretty-printed API responses and config files commonly shrink by 30–60%, since indentation dominates deeply nested structures.

Minified JSON is what you want for API payloads, config files shipped to production and data embedded in HTML pages. Need the opposite — turning a compact response back into something readable, with sorted keys and indentation? That is a formatting job: use the JSON formatter, this tool's counterpart.

Example. JavaScript const x = 1; /* note */ loses the comment and the extra spaces, and the panel shows the byte size before and after.

Limit. JavaScript names are not shortened; JSON must parse or it is rejected, and HTML leaves pre, textarea, script and style contents untouched.