Ad Browse privately on public Wi-Fi See the current NordVPN offer

JSON Validator

Validate JSON syntax and get the exact line and column of the first error, plus document statistics.

What is a JSON validator?

A JSON validator checks whether a document is syntactically valid and, when it is not, tells you exactly where the parser failed — line and column — instead of just “invalid JSON”.

What you get

Besides validity, this tool counts the objects, arrays, keys and characters of your document, so you can spot structural problems at a glance. Everything runs in your browser.

What counts as valid

This tool checks syntax — the rules of JSON (RFC 8259). Two consequences are worth knowing before you trust a green check:

  • Duplicate keys are accepted. {"a": 1, "a": 2} is valid JSON, and when it is parsed the last value wins. This tool does not flag it, so a repeated key will not show up as an error.
  • It is not a JSON Schema validator. It confirms the document parses, not that it matches a shape you were expecting. Field names, types and required properties are out of scope here.

Why a document gets rejected

These look like JSON but are not part of the specification:

  • comments (// or /* */) — that is JSONC, not JSON
  • a trailing comma after the last element
  • single quotes instead of double quotes
  • unquoted keys
  • NaN, Infinity and undefined
  • a byte order mark (BOM) before the opening brace

The reported line and column point to where the parser gave up, which is usually just after the real mistake — so look slightly before them.

Related