JSON Minifier
Minify JSON by removing unnecessary whitespace and comments for a smaller output.
This tool runs entirely in your browser. Your files are never uploaded to a server.
{"name":"Ada","active":true}What this minifier does
Parses the input as strict JSON and serializes the resulting JavaScript value onto one compact line with JSON.stringify. Structural whitespace is removed and invalid JSON produces the browser's parse error instead of output.
How to use it
Paste a JSON object, array, string, number, boolean, or null. Review and copy the immediate result; Reset clears the editor and no file is downloaded.
Normalization and limits
This is parse-and-reserialize behavior, not lossless text compression. Duplicate object keys collapse to the last parsed value; number spelling, escapes, and key ordering can be normalized by JavaScript, and negative zero becomes zero. Comments, trailing commas, NaN, Infinity, undefined, BigInt, and JSON5 syntax are rejected. It does not validate against a schema or calculate byte savings.
How the reserialization works
The pasted text is parsed with the browser's built-in JSON parser into a JavaScript value, then that value is passed straight to JSON.stringify with no indentation argument, which is what produces the single compact line.
Example
Pasting `{ "id": 1, "name": "Ada" }` produces `{"id":1,"name":"Ada"}` on a single line, with all structural whitespace removed.
Safe review workflow
Diff the compact output's parsed value against the source for any application that depends on exact key order or number formatting, since JavaScript's own JSON handling — not this tool — decides those details.
Privacy
Parsing happens locally in your browser. Input and compact output are not uploaded by this tool.
Frequently Asked Questions
- What does the JSON Minifier do?
- Minify JSON by removing unnecessary whitespace and comments for a smaller output.
- Does this JSON tool change program behavior?
- It only changes layout or removable whitespace. Review minified output before production use when code relies on unusual syntax.
- Is my code uploaded?
- Processing is local and your code is never uploaded.
Related Tools
SCSS Formatter
Format and indent SCSS code into a clean, readable structure directly in your browser.
HTML Formatter
Format and indent HTML code into a clean, readable structure directly in your browser.
JSON Formatter
Format, validate and beautify JSON for free.
CSS Minifier
Minify CSS by removing unnecessary whitespace and comments for a smaller output.
CSV to JSON Converter
Convert CSV files into JSON arrays instantly, right in your browser.
HTML Minifier
Minify HTML by removing unnecessary whitespace and comments for a smaller output.