Logo JSON Parser Online

Minify JSON Online

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.

All JSON Tools

28 tools

Free, fast, runs in your browser. No login needed.

Made with ❤️ in India · © 2025 parsejsononline.com
INPUT
1
OUTPUT
1
✅ Ready
Characters: 0
Ctrl+Enter to run
What is this tool?

How to use

  1. Paste your formatted JSON into the INPUT pane.
  2. Click Minify.
  3. The output is a single-line minified string. The status bar shows: Saved X.X% — N to M chars.
  4. Click Copy or Download to use the output.

How it works

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.

FAQ

Does minifying JSON reduce file size?

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.

Does it change the data?

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.

What if I want to reverse this?

Use the JSON Formatter on this site. Paste the minified string and click Prettify to restore readable formatting with your preferred indentation.

Is my data sent anywhere?

No. Minification runs in your browser using native JavaScript. Nothing is transmitted.

What is the maximum input size?

No limit is enforced. Multi-megabyte inputs minify without issues.

Related tools

JSON FormatterReverse: prettify minified JSON with indent control. JSON ValidatorValidate syntax before minifying. JSON to CSVConvert JSON arrays to a smaller tabular format.