Skip to content

JSON Validator

Find out whether your JSON is valid. If it is not, see the exact line and what to change.

  • Free, no account
  • Nothing uploaded
  • 13 tools
Input
Output
working…in 139 B · 8 linesProcessed in this tab, no request made

Nothing you paste is uploaded. The server sends connect-src 'self', so your browser blocks this page from contacting any other host. Check it yourself

Validate JSON against RFC 8259 and see the exact line and column of the first error, with a plain explanation of what to change. Runs in your browser tab.

What counts as valid JSON

The validator applies RFC 8259 through the browser's own JSON.parse. When that rejects the text, a second, tolerant parser locates the first problem, so the line and column do not depend on how your browser words its error message.

The errors people hit most

InputWhy it fails
{"a": 1,}Trailing comma. JSON has no comma after the last member.
{'a': 1}Single quotes. Strings and keys need double quotes.
{a: 1}Unquoted key. That is a JavaScript object literal, not JSON.
{"a": 01}Leading zero in a number.
{"a": NaN}NaN, Infinity and undefined are not JSON values.
{"a": 1} {"b": 2}Two values. A document holds one; wrap several in an array.

A valid document gets a short report: the type of the root, the number of keys and values, and the nesting depth. To fix an invalid one automatically, open it in the JSON formatter and choose Repair.

Questions

Short answers to what people ask most.

Which JSON standard does the validator follow?

RFC 8259, as implemented by JSON.parse in your browser. That means double-quoted strings and keys, no comments, no trailing commas, no NaN or Infinity, and no leading zeros in numbers.

Are duplicate keys an error?

Not for this validator. RFC 8259 says names "should" be unique but does not forbid duplicates, and JSON.parse keeps the last value. Many consumers behave differently, so avoid them even though they pass.

Does it validate against a JSON Schema?

No. It checks syntax only: whether the text is JSON. It does not check that the data has the fields or types your application expects.

My JSON has comments and works in my editor. Why is it invalid?

Files like tsconfig.json or VS Code settings are JSONC or JSON5, supersets that allow comments and trailing commas. They are not valid JSON for an API or JSON.parse. The JSON formatter can strip those with Repair.