ToolsPoint Guide · Updated October 21, 2026

How to Format and Validate JSON (With Common Errors)

Make minified JSON readable and find syntax errors in seconds — plus a list of the mistakes that break JSON most often.

JSON (JavaScript Object Notation) is the standard format for APIs, configuration files and data exchange. Machines are happy with a single long line of JSON, but people are not. Formatting adds indentation and line breaks so you can read the structure, while validation tells you exactly where a syntax error is.

How to format JSON online

  1. Open the JSON Formatter.
  2. Paste your JSON into the input box (or load a sample).
  3. Click Format. Valid JSON is pretty-printed with your chosen indentation.
  4. If the JSON is invalid, read the error message — it shows the line and position of the problem.
  5. Copy or download the formatted result.

The most common JSON errors

ErrorWrongCorrect
Trailing comma{"a": 1,}{"a": 1}
Single quotes{'a': 'b'}{"a": "b"}
Unquoted keys{a: 1}{"a": 1}
Comments// noteNot allowed in JSON
Undefined / NaN{"a": undefined}{"a": null}

Other useful JSON tools

Privacy tip

ToolsPoint's JSON tools run in your browser, but you should still remove secrets like API keys, tokens and passwords before pasting data into any website.

Try it now: JSON Formatter

Format and prettify JSON with validation. Free, fast and private.

Open JSON Formatter →