How to format JSON and find syntax errors

Formatting makes nested objects and arrays readable. Paste a JSON response and the tool will indent it when valid, or report a syntax error so you can fix the input.

Input

Output

Your result will appear here.

Your input is processed locally in this browser and is not uploaded by this tool. Tool activity

Steps

  1. Paste a JSON object, array, or simple value in the input area.
  2. Select Format. If it reports an error, check quotes, commas, and whether each bracket is closed.
  3. Copy the readable result or choose Minify for a compact one-line value.

Worked example

Paste this example and format it to see the nested array.

{"project":"EZOL","formats":["PNG","JPG"],"enabled":true}

Why use this tool?

  • Indent a long API response to make related fields and matching brackets easier to find.
  • Catch a syntax error such as a trailing comma before pasting the JSON back into your config.

Common errors when copying from JavaScript

JSON keys and strings need double quotes. Comments, trailing commas, and values such as undefined are invalid. Remove or replace them when you paste data copied from a JavaScript file.

Check the characters immediately before the reported position. An omitted comma often makes the next property look like the source of the error.

Frequently asked question

Does valid JSON meet my API contract?

Syntax checking confirms that the text parses. Compare required properties and value types with the API contract or a JSON Schema.