JSON Validator

Check if JSON is valid - and see exactly where it breaks

Validate JSON and see exactly where any syntax error is - line, column and the surrounding code with a pointer - plus a hint about the likely cause.
Try an example:

Output will appear here...

About JSON Validator

How it works

  1. The text is parsed with the browser's strict JSON parser (RFC 8259).
  2. If it is valid, you see the structure: top-level type, number of keys, arrays and nesting depth.
  3. If not, the error position is converted to a line and column and shown with the surrounding lines and a ^ marker.
  4. The text is also checked for common mistakes - trailing commas, single quotes, unquoted keys, comments - to explain the cause.

What you need

  • The JSON text you want to check.

Tips

  • JavaScript objects are not JSON: keys need double quotes and trailing commas are not allowed.

Runs in your browser. Everything happens in your browser - your code and data are never uploaded.

Frequently asked questions

What makes JSON invalid?+

The most common causes are trailing commas, single quotes instead of double quotes, unquoted keys, comments, and values like undefined or NaN. The error shows the exact line and column, and a hint names the likely cause.

Is my JSON sent anywhere?+

No. Parsing and formatting happen in your browser with the built-in JSON engine.