JSON Minifier

Strip whitespace and line breaks from JSON without touching string contents or number precision.

Input

Up to 5 MiB. The file is not uploaded: it is read in your browser.

Ctrl + Enter to run

Result

The JSON minifier removes the extra spaces, tabs and line breaks between elements to produce the most compact JSON. String contents, including inner spaces and escapes, are untouched and numbers are copied literally.

How to use it

  1. Paste the indented JSON.
  2. Press Run.
  3. Copy the single-line result or download it.

Example

Example input
{
  "name": "Ana Pérez",
  "note": "  espacios   internos  ",
  "items": [1, 2, 3]
}
Result
{"name":"Ana Pérez","note":"  espacios   internos  ","items":[1,2,3]}

Limitations

  • It does not shorten key names or change number representation (1.0 stays 1.0).
  • The JSON must be valid; otherwise the error is shown with its position.

FAQ

Does minifying change the meaning of JSON?
No. Only insignificant whitespace between tokens is removed, which the specification allows parsers to ignore.
How much smaller does it get?
It depends on the original indentation; the tool shows input and output sizes for comparison.

Related tools

References