JSON Wrench

JSON Minifier

Input
All processing happens in your browser. Your JSON is never uploaded.
Output
Paste JSON on the left. It's checked as you type. Broken JSON gets an exact error location and a one-click fix.

Minifying JSON removes the spaces, tabs and newlines between values so the document is as small as possible for API payloads, environment variables, config strings and storage.

Paste JSON above and press Minify (or Ctrl/Cmd + Shift + M). The output can be copied or downloaded as a .json file. Press Format to switch back to readable, indented JSON.

Example

Input
{
  "id": 1,
  "name": "Ada Lovelace",
  "price": 12345678901234567890,
  "tags": ["math", "code"]
}
Minified
{"id":1,"name":"Ada Lovelace","price":12345678901234567890,"tags":["math","code"]}

Exact output, not a re-serialization

Most minifiers run JSON.stringify(JSON.parse(text)), which silently changes data: large numbers lose precision, 1.10 becomes 1.1, and duplicate keys disappear. JSON Wrench removes whitespace outside strings and nothing else, so the large number in the example stays 12345678901234567890 and whitespace inside strings is untouched.

Minify broken JSON too

If the input is invalid, Minify runs auto-fix first and minifies the repaired result, with the list of changes shown above the output. If it cannot be repaired safely, the error is shown instead.

Frequently asked questions

Does minifying JSON change the data?

Not with JSON Wrench. Only whitespace between tokens is removed. Every string, number, key and its order is kept exactly as written.

How much smaller does minified JSON get?

It depends on the indentation. Pretty-printed JSON with 2-space indentation typically shrinks by 10 to 30 percent. For more, enable gzip or brotli on your server.

More JSON tools