Search tools

JSON Minifier

Remove all unnecessary whitespace from JSON without touching strings or numbers.

Data

Format

Why parsing first matters

  • Strings stay intact: Spaces and line breaks inside strings are part of the data and are kept; only whitespace between values is removed.
  • Invalid input is caught: If the JSON is broken, you see where, instead of getting a result that looks compact but does not parse.
  • Exact values: Numbers and escapes are copied as written, so the minified data means exactly the same as the original.

Frequently asked questions

How much smaller does JSON get?

It depends on how much indentation the original had. Pretty-printed JSON often shrinks by 20 to 40 percent.

Can I undo it?

Yes. Your input is never changed, and Format on this page turns minified JSON back into indented JSON.