Find JSON syntax errors
Paste the JSON you want to check. Valid input produces a confirmation with line and character counts. Invalid input produces a parser error. Location details depend on the error message supplied by your browser, so some errors do not include a separate line and column.
For example, {"enabled":true,} fails because of the trailing comma. Remove it to get {"enabled":true}. Other common causes are single-quoted strings, unquoted property names, comments, and a missing closing brace. A JSON value can also be an array, string, number, boolean, or null.
Decide what kind of validation you need
Syntax checking answers whether the text can be parsed as JSON. It does not check an API contract, detect every duplicate property, or prove that the data is correct. The checker follows JavaScript's JSON.parse behavior.
Use the JSON formatter to indent a valid document. Use the JSON Schema validator for supported structural checks, such as required fields and numeric bounds.
Common questions
- Can JSON contain comments or trailing commas?
- No. Standard JSON rejects comments and trailing commas. Remove them before validating the document.
- Why is there no line or column for an error?
- The checker extracts a position when the browser includes one in its parser error. Some errors and browsers provide only a message.