Formula
JSON text → value (grammar of RFC 8259)
- Valid means the text parses as exactly one JSON value with nothing after it.
The parser either reaches the end cleanly or stops at the first mistake and tells you where.
Worked example
Valid JSON
- JSON
- {"id":1,"tags":["a","b"],"ok":true}
Result
Valid JSON ✓
Top-level type: object
Nesting depth: 3
Objects: 1
How it works
The validator follows the JSON grammar strictly: keys and strings use double quotes, no trailing commas, no comments, no leading zeros, and no NaN or undefined. When it finds a problem it stops at the first one and reports the line and column, with a short excerpt and a caret under the position.
When the JSON is valid you also get its shape — top-level type, nesting depth and counts of objects, arrays, keys, strings, numbers, booleans and nulls — plus warnings for duplicate keys and for whole numbers too big for JavaScript to hold exactly. To tidy valid JSON use the JSON Formatter; to compress it use the JSON Minifier.
Assumptions and limits
- Only the first error is reported.
- 5 MB limit.