JSON formatter and validator

Parse JSON and pretty-print it, or show the parser error.

Nothing you type is sent. The work stays in this browser.

How to use it

  1. Paste JSON.
  2. Format it with two-space indentation. Sorting keys is optional and changes the order.
  3. An error means JSON.parse rejected the text. The message is the engine's message.

Trailing commas, comments, and single quotes are not valid JSON, so they fail here even if some editors accept them.

Numbers that cannot be represented exactly in IEEE-754 will round-trip the way JavaScript numbers do. The page does not pretend otherwise.

The text stays in the browser.

Related tools