Minify JSON — compact output, nothing uploaded

Pretty-printed JSON is for humans; the whitespace is dead weight the moment a machine takes over. Minifying strips every unnecessary space, tab, and newline, which matters when the file is an API payload, a fixture shipped with an app, or a config bundled into a build — indentation can easily account for a fifth of a deeply nested file. This tool parses your JSON and re-serializes it with zero whitespace, entirely on your device. Nothing is uploaded, so minifying a file that happens to contain credentials or production data doesn’t mean disclosing it to whoever runs the tool. Invalid input produces a clear error rather than a corrupted file, so it also works as a quick sanity check before deploying.

How it works

  1. Drop a .json file below.
  2. All whitespace outside string values is stripped.
  3. Download the minified file — same data, smaller size.

Frequently asked questions

How much smaller will the file get?

It depends on how it was formatted. A deeply nested file pretty-printed with 4-space indentation can shrink substantially — often 20% or more — while an already-compact file barely changes. Whitespace inside string values is data, so it’s always preserved.

Is minification reversible?

Yes — minification only removes formatting, never data. Run the result through the JSON formatter on this site to get readable indentation back at any time.

Does the file get sent to your server?

No. Parsing and re-serializing happen in your browser; there is no server-side processing at all. Config files and payloads that contain secrets or business data never leave your machine, which you can verify with the network tab open.

Why did I get an error instead of output?

Minification requires parsing, so the input must be valid JSON. Common culprits: trailing commas, single-quoted strings, comments, or unquoted keys — all fine in JavaScript, all illegal in JSON. The error message points you at the problem.