JSON Formatter

Paste JSON to beautify it, minify it, or find out exactly why it fails to parse.

waiting for input
—

How to use the json formatter

  1. Paste or type JSON on the left.
  2. Choose an indent size, or switch to minify mode.
  3. Read the status line: valid JSON reports the type and size; invalid JSON points to the failing character.
  4. Copy or download the formatted result.

JSON is unforgiving: one trailing comma or an unescaped quote and the whole document is invalid. Rather than hunting for the problem by eye, this formatter parses the text with the same rules the browser uses and reports the exact position of the first failure.

Everything runs locally, which matters when the payload contains API keys, customer records or access tokens. Nothing is logged or transmitted.

Common causes of invalid JSON

Minifying strips all insignificant whitespace, which is what you want before embedding JSON in a header, in a URL parameter, or inside another JSON string.

Frequently asked questions

Is my JSON uploaded anywhere?

No. Parsing and formatting happen in your browser with the native JSON parser.

Does it validate against a schema?

It validates JSON syntax, not a schema. A document can be perfectly valid JSON and still have the wrong shape for your API.

How large a file can it handle?

Several megabytes is fine on a normal machine; beyond that, browser rendering of the formatted text becomes the bottleneck.

Can I sort the keys?

Yes — enable alphabetical key sorting to get a stable, diff-friendly ordering.

Related tools