JSON QuickFix › Minify JSON

Minify JSON

Paste formatted JSON and press Minify to remove every unnecessary space and line break. Useful for API payloads, environment variables, embedding JSON in HTML, and shaving bytes off files you ship.

Input

Paste some JSON, drop a .json file, or load the sample to get started.
Advertisement

What minifying does

Minifying removes whitespace outside strings: indentation, line breaks and spaces after colons and commas. The data is unchanged, so JSON.parse returns exactly the same value as before. Spaces inside string values are kept.

How much smaller does it get?

It depends on how deeply nested the file is. Indented JSON with many short values often shrinks by 20–40%. The status bar shows the size after minifying so you can compare.

Minify vs gzip

If your server already compresses responses with gzip or Brotli, minifying saves less over the network, since repeated whitespace compresses well. It still helps for storage, logs, environment variables and anywhere the raw size matters.

Advertisement

Frequently asked questions

Does minifying change my data?

No. Only whitespace between tokens is removed. Keys, values and array order stay identical.

Can I minify invalid JSON?

Not directly, because minifying needs to parse it first. Press Quick Fix to repair it, then Minify.

How do I un-minify JSON?

Press Format to add indentation back, using 2 spaces, 4 spaces or tabs.