JSON Validator
Check whether your JSON is valid against the JSON standard (RFC 8259). If it isn’t, the validator points to the line and column of the problem, shows the line itself and suggests the likely fix. Valid JSON gets a structure summary.
Validate JSON
How validation works
The text is parsed with the browser’s strict JSON parser, which follows RFC 8259 and ECMA-404. That means no comments, no trailing commas, no single quotes and no unquoted keys, even though JavaScript itself allows some of these.
Error messages explained
| Message | Usual cause | Fix |
|---|---|---|
| Unexpected token / Expected property name | Unquoted key, single quotes or a trailing comma | Use double quotes; remove the last comma |
| Expected ‘,’ or ‘}’ | Missing comma between items | Add a comma after the previous value |
| Unexpected end of JSON input | Unclosed { or [ | Add the closing bracket |
| Bad control character in string | A raw line break or tab inside quotes | Write \n or \t |
| Unexpected non-whitespace character | Two values without a wrapping array | Wrap them in [ ] and separate with commas |
JSON data types
| Type | Example |
|---|---|
| Object | {"key": "value"} |
| Array | [1, 2, 3] |
| String | "hello" |
| Number | 42, -3.5, 1e6 |
| Boolean | true, false |
| Null | null |
Frequently asked questions
Is a single number or string valid JSON?
Yes. Since RFC 7159, any JSON value, such as 42 or "text", is a valid JSON document, although most APIs send an object or array.
Does it validate against a JSON Schema?
No, it checks syntax only. Schema validation checks required fields and types for a specific API.
Is my JSON sent anywhere?
No. Validation runs in your browser.
