JSON Minifier

Remove every unnecessary space and line break to get the smallest valid JSON. Values stay exactly as written, and nothing leaves your browser.

About the JSON Minifier

Minify JSON by removing every space, tab and line break that is not inside a string. The result is the smallest valid form of the same document, ready for an API request, a config value or a URL parameter. The tool shows how much smaller it got.

How to use it

  1. 1Paste your JSON, or upload a .json file.
  2. 2The minified result appears on the right as you type, with its size and the percentage saved.
  3. 3Copy it, or download it as minified.json.

Frequently asked questions

Does minifying change my data?

No. Only whitespace outside strings is removed. Every key, value, number and escape stays exactly as written, and spaces inside strings are kept.

Is my JSON sent to a server?

No. Everything runs in your browser. Nothing you paste or upload is sent anywhere, logged or stored, so it is safe to use with API responses and config files.

Why do large numbers stay exactly as I wrote them?

Most online formatters convert your text to JavaScript numbers and back, which silently rounds anything beyond 2^53 - an ID like 12345678901234567890 becomes 12345678901234567000. This tool keeps every number, escape and key exactly as written and only changes the spacing.

What errors can it detect?

Every rule of standard JSON: trailing commas, single quotes, comments, unquoted keys, missing commas or colons, mismatched brackets, unclosed strings, leading zeros, NaN and Infinity, and Python-style True, False or None. Each error shows the line, the column and a plain explanation.

Does it find duplicate keys?

Yes. A key that appears twice in the same object is valid JSON but usually a mistake, because most parsers keep only the last value. The tool lists each duplicate with its line number as a warning.

Is there a size limit?

There is no upload limit, because nothing is uploaded. Very large documents of several megabytes still work; above about 200 KB the colours are switched off to keep typing fast.