1. Home
  2. JSON
  3. JSON Minifier

JSON Minifier

Strip whitespace from JSON to make it as small as possible, without changing a single value.

Runs in your browser

Minified JSON

Waiting for input.
Format it again

What is the JSON Minifier?

The JSON Minifier removes every space, tab and line break that is not part of a value, producing the smallest valid JSON. Minified JSON loads faster over the network, takes less storage and fits into environment variables, URLs and single-line logs.

The JSON is checked first, so you never ship a broken file, and numbers and strings are copied exactly as written. Long IDs are never rounded and escapes are kept as they were.

How to use it

  1. Paste JSON, upload a file or click Example.
  2. The minified JSON appears instantly, with the size before and after.
  3. Turn on Allow comments if your file is JSONC (comments are removed).
  4. Copy the result or download it.

Example

Input
{
  "name": "Nova",
  "tools": [
    "json",
    "pdf"
  ]
}
Output
{"name":"Nova","tools":["json","pdf"]}

Features

  • Smallest output. Removes all whitespace outside strings.
  • Validated first. Invalid JSON is reported with the exact line and column instead of being minified.
  • Exact values. Numbers and escapes are copied character for character.
  • Strips comments. Optionally accepts JSONC and removes comments and trailing commas.
  • Size saved. Shows the original size, the minified size and the percentage saved.
  • Private. Your JSON is processed in your browser and never uploaded.

Frequently asked questions

Does minifying change my data?

No. Only whitespace between values is removed. Strings, numbers and key order stay exactly the same, so the minified JSON parses to the identical data.

How much smaller will my JSON get?

Typically 10–30% for pretty-printed JSON, more for deeply indented files. If you serve JSON over the web, gzip or Brotli compression on the server saves far more, and works best together with minifying.

Can I undo minification?

Yes. Paste the result into the JSON Formatter to pretty-print it again. Comments are removed when minifying and cannot be brought back.

Is my JSON uploaded?

No. Everything happens in your browser.

Last updated · Free, no sign-up, runs in your browser.

Free for everyone, kept free by you.

No paywall, no sign-up and no watermarks. If a tool saved you time, you can chip in any amount by UPI to keep Nova Free Tools running.

Esc
↑↓ move↵ openEsc close