Home › Formatters › JSON Formatter

JSON Formatter

Paste unformatted JSON and get it back neatly indented and easy to scan. If the JSON is broken, you get the exact position of the problem instead of a silent failure.

JSON Formatter

How to use the JSON Formatter

  1. Paste your JSON into the input box, or press "Load sample" to try an example.
  2. Choose an indent style: 2 spaces, 4 spaces or tab.
  3. Press Format. The formatted JSON appears in the output box.
  4. Copy the result, or download it as a text file.

About this tool

JSON is the language of APIs and config files, but machines write it in one long line. A formatter restores the structure — nesting, arrays and objects — so humans can read, review and debug it. This formatter parses your input properly rather than guessing with search-and-replace, so invalid JSON is reported with its position instead of being mangled.