🧾 JSON Minifier β€” Remove Whitespace Safely

Paste a JSON document to strip insignificant whitespace. The minifier parses first, so comments are rejected and strings keep their escaped characters.

JSON Free Β· no sign-up Added 2026-10-05
Input
Result
Size

Private by design. This tool runs entirely in your browser β€” nothing you enter or add is uploaded to any server.

How it works

  1. Paste JSON. Trailing commas and comments are not valid JSON and will be flagged.
  2. Press Minify JSON. The page parses the document, then serializes it with no added spaces.
  3. Compare character counts to see how much formatting whitespace was removed.

Examples

  • {"a": 1, "b": [2, 3]} minifies to {"a":1,"b":[2,3]}.
  • A trailing comma such as {"a":1,} is reported as invalid.
  • Strings keep internal spaces; only structural whitespace is removed.

Frequently asked questions

Is this the same as a JSON formatter?

A formatter adds indentation for reading. This tool removes that formatting so the document is smaller to paste into configs, query strings or fixtures.

Will key order change?

Keys stay in the order the parser returned them, which in current browsers is the order they appeared in the object.

Is the JSON uploaded?

No. Parsing and serialization happen locally with JSON.parse and JSON.stringify.

More JSON tools β†’