Skip to main content

JSON Minifier

Runs locally

Compress JSON by stripping whitespace and comments while tracking byte savings.

What is JSON Minifier?

Strip whitespace, newlines, and optional JSONC comments to produce compact single-line JSON payloads. Preserves large integers above 2^53 and reports exact before/after byte savings.

How to use JSON Minifier

  1. Step 1

    Paste formatted JSON or drop a .json file.

  2. Step 2

    Review byte reduction and validity in the status bar.

  3. Step 3

    Copy or download the minified output.

Features

  • Single-line whitespace removal with BigInt preservation
  • Supports JSONC comment stripping before minifying
  • Real-time byte savings percentage indicator
  • Worker-backed execution for large files
  • Instant switch to Format, Tree, or Table view
  • Copy as Markdown or download .min.json

Example

Input

{
  "ok": true,
  "items": [1, 2, 3]
}

Output

{"ok":true,"items":[1,2,3]}

Removes indentation and newlines without altering keys or values.

Frequently asked questions

Does minifying change data types?

No. Only insignificant whitespace is removed; values and precision stay intact.

Can it strip comments before minifying?

Yes, choose JSONC parser mode to strip // and /* */ comments cleanly.

Is my data sent anywhere?

No, compression happens inside your browser.

Can I re-format the minified JSON later?

Yes, switch the mode to Format at any time.