Paste formatted JSON and click Minify. All whitespace — spaces, newlines, indentation — is removed, producing a single-line string. The status bar shows the original character count, the minified count, and the percentage saved.
Free, fast, runs in your browser. No login needed.
The minifier runs JSON.parse() on your input, then JSON.stringify(data) with no indentation argument. This removes all whitespace that exists outside string values — spaces, newlines, and indentation — while leaving string content unchanged.
What the percentage means. The reported reduction is based on character count: (1 - minified.length / original.length) × 100. For heavily indented JSON, this is typically 40–70%. If your input is already minified or contains very few strings, the saving will be close to 0%. The percentage reflects characters, not bytes — the actual byte saving after gzip compression will differ.
Side effects of the round-trip. Like any tool that parses then re-serializes, this one inherits the same behavior as the formatter: integer-like keys get reordered, undefined values are dropped, and NaN/Infinity become null. If your JSON came from a strict serializer and doesn't contain those edge cases, the minified output is semantically identical to the input.
Use cases. Reducing payload size in HTTP requests and responses; embedding JSON into a JavaScript or HTML file as a string literal; storing configuration in an environment variable where whitespace wastes space.
There is no size limit. The tool validates syntax as a side effect — if the input is not valid JSON, it returns an error before minifying.
Yes, it removes whitespace outside string values. Typical savings are 40–70% on human-formatted JSON. The percentage shown is character-based. Gzip compression applied afterward often erases most of that saving, but minified JSON still has a smaller uncompressed footprint.
No — semantically the data is identical. The only structural side effects are: integer-like keys get sorted numerically (ECMAScript behavior), undefined values are dropped, and NaN/Infinity become null. These match the behavior of JSON.stringify() in any environment.
Use the JSON Formatter on this site. Paste the minified string and click Prettify to restore readable formatting with your preferred indentation.
No. Minification runs in your browser using native JavaScript. Nothing is transmitted.
No limit is enforced. Multi-megabyte inputs minify without issues.