Skip to content

JSON Minify

Minify JSON to a compact single line.

Loading…

About JSON Minify

Smaller payloads help when JSON sits in a database column, an embedded script tag or a request body. Paste a document and every space, tab and line break outside strings disappears straight away, with no button to press. Numbers keep their original text, so 1.10 stays 1.10 and large integers stay exact, and repeated keys are left in their original order. Text that is not valid JSON is not guessed at: you get an error and no output.

Features

  • Removes spaces, tabs and line breaks outside strings
  • Updates live on every edit
  • Number text such as 1.10 and 12345678901234567890 kept exactly
  • Key order and repeated keys preserved
  • Invalid JSON is reported instead of being repaired

Limitations

  • Escape sequences inside strings are rewritten in their standard form, so \u00e9 comes out as é: the value is identical but the characters differ.
  • Nesting deeper than 1,000 levels is refused, as is output longer than 20,000,000 characters.
  • Downloading the result, saved as output.txt, needs a free account; copying it does not.

How it works

  1. Paste or type JSON into the JSON Input panel.
  2. Watch the Minified JSON panel fill in as you type; there is no Minify button to press.
  3. If the text is not valid JSON, an error message appears and the output stays empty.
  4. Select Copy Output to copy the result, or Download to save it as output.txt.

Example input

{
  "user": "auro",
  "active": true,
  "roles": ["admin", "editor"]
}

Frequently asked questions