Private browser-based developer tool

Online JSON Validator with Error Details

Check whether a document follows JSON syntax and get line and column context when parsing fails. Validation updates while you edit, allowing you to correct an error and confirm the result immediately.

The validator checks syntax, not whether a payload satisfies an API contract. A syntactically valid value can still be missing required fields or contain values that an application rejects.

What this validator checks

Valid JSON has one top-level value; double-quoted property names and strings; correctly paired braces and brackets; commas only between members or items; and numbers written using JSON’s number grammar. The literals true, false, and null are lowercase.

When parsing fails, the editor reports the parser message and, where available, converts the character position into a line and column. Start at that location but also inspect the preceding token, because a missing comma or quote is often detected only when the next token is read.

Syntax validation is not schema validation

Syntax answers “can this text be parsed as JSON?” A schema answers questions such as whether an id must be a string, an array needs at least one item, or additional properties are permitted. JSONFormatView currently performs syntax validation and does not claim to validate JSON Schema.

Frequent causes of invalid JSON

Common failures include a comma after the final member, single quotes copied from JavaScript, comments, an unquoted property name, an unescaped line break in a string, or mismatched closing brackets. The repair tool can preview a limited set of high-confidence corrections; always review repaired output.

Frequently asked questions

Can valid JSON begin with an array?

Yes. Any JSON value—including an object, array, string, number, boolean, or null—can be the top-level value.

Are comments allowed in JSON?

No. Standard JSON has no comment syntax. Some configuration formats accept JSON with comments, but that is a different grammar.

Does valid JSON guarantee my API will accept it?

No. The API may impose its own field, type, range, and authentication requirements.