JSON formatter and validator

Paste JSON, then format it. Parsing happens in this page. Nothing is uploaded.


Worked example

The box starts with a small object: trail miles and a kilometer conversion. Click Format. You should see the same keys, indented, with the number 4.828032 preserved. If you delete the last closing brace and click Format, the status line reports a parse error and the position, instead of inventing a fix. That is the point of a validator: it tells you where the text broke.

FAQ

  1. Is my JSON sent to a server? No. It is parsed with the browser's built-in JSON.parse.
  2. Does it sort keys? No. Key order is left as the parser returns it.
  3. What about trailing commas? Standard JSON does not allow them; the tool will report an error, which is correct.

Header photo: Wrench Sockets by Jaroslaw%20Puszczy%u0144ski, CC0 1.0 (cropped and resized)