JSON Validator
Check that a document is valid JSON and see exactly where the syntax breaks, entirely in your browser.
Runs entirely in your browser. Nothing is uploaded, logged or stored.
A JSON document either parses or it does not, and the useful part is knowing where it stops parsing. Paste the document and the position of the first syntax error is reported, in your browser.
How it works
Validation is a real parse with the browser's JSON parser, not a pattern match, so it accepts exactly what any conforming parser accepts: no trailing commas, no comments, keys and strings in double quotes, no leading zero or hexadecimal in numbers.
Only the first error is reported. JSON parsers stop at the first problem, so a second error only becomes visible once the first one is fixed.
Examples
| Case | Input | Result |
|---|---|---|
| A trailing comma | {"a": 1,} | Syntax error |
Frequently asked questions
Does a valid document mean my data is correct?
It means the syntax is correct. Whether the required fields are present and hold the expected types is a schema question, which JSON Schema validation answers and this tool does not.
Is a bare string or number valid JSON?
Yes. Since RFC 7159 any JSON value is a valid document, so "hello", 42 and null all parse. Older parsers that only accept an object or an array at the top level follow the original and stricter RFC 4627.
Good to know
- Everything happens in your browser. The document is not uploaded, not logged and not stored.
- Integers larger than 2^53 lose precision, because JavaScript, which does the work here, reads every JSON number as a double precision float. Very large identifiers should be transported as strings.