JSON Validator
Validate JSON and get the line and column of any syntax error, with a pointer to the problem. Runs in your browser.
Validate JSON and get the line and column of any syntax error, with a pointer to the problem. Runs in your browser.
A missing comma or an extra trailing comma is enough to make JSON invalid, and large files make it hard to spot. This validator tells you whether the JSON is valid and, if not, shows the line and column of the problem with a pointer.
Valid JSON also gets a short summary: the root type, how deeply it is nested and its size.
Invalid JSON Expected double-quoted property name Line 4, column 1 } ^
JSON is defined by RFC 8259 and ECMA-404, and its grammar is strict. Objects use curly braces with double-quoted keys, arrays use square brackets, and values can be strings, numbers, true, false, null, objects or arrays. There are no comments, no trailing commas, no single quotes and no undefined, NaN or Infinity. A validator runs the text through a parser and reports the first position where the grammar breaks, which is why the error is usually a missing comma, quote or bracket just before the pointer.
The reported line and column are where the parser noticed the problem, not always where the mistake began. For example, a missing closing quote may only be detected several characters later. Valid does not mean correct: the validator checks syntax, not meaning, so a payload with the wrong field names still passes. Numbers also have limits, since the format allows arbitrarily large digits but parsers using double-precision floats lose accuracy above 2 to the power 53, which affects large IDs.
The JSON standard does not allow a comma after the last item in an object or array, though some languages accept it.
No. Keys and strings must use double quotes.
It reports the first error the parser hits. Fix it and the next one, if any, appears.
No. Validation runs in your browser.
No. This tool checks syntax only, meaning the text can be parsed. To verify required fields, types and allowed values you need a schema validator, for example one that uses JSON Schema.
Invisible characters like a byte order mark or non-breaking space can break parsing. Retype the affected area or paste the text into a plain-text editor first.