JSON Minifier

Minify JSON by removing whitespace and comments, and see the size reduction.

Related Tools

0 comments

How it works

Paste your formatted JSON. The tool parses it (catching syntax errors) and re-serialises it without any whitespace, producing the most compact valid JSON string. It shows the original byte size, minified byte size, and the percentage reduction. Because the input is parsed first, the output is always valid, normalised JSON. Everything runs in your browser — nothing is sent to a server.

Common use cases

  • Shrinking a JSON config or API payload before embedding it in source code.
  • Reducing bandwidth when manually crafting a small API request body.
  • Validating that JSON is syntactically correct while also compressing it.

Frequently asked questions

Does this preserve the data structure?

Yes. Minification only removes whitespace (spaces, newlines, tabs outside strings). All keys, values, and structure are preserved exactly.

Can I minify JSON with comments (JSONC)?

Standard JSON does not allow comments. The tool strips // and /* */ comments as a convenience before parsing, but the output will be pure JSON without comments.