JSON Validator
Runs in your browserCheck whether JSON is valid, with the exact line and column of any error.
JSON
What is a JSON Validator?
JSON's grammar is small but strict: keys must be double-quoted strings, trailing commas are not allowed, and single quotes, comments, and unquoted keys — all valid in JavaScript object literals — are not valid JSON at all. A validator checks input against that exact grammar and reports the first place it breaks down.
This differs from a formatter in what it optimises for. A formatter assumes your JSON is basically fine and re-prints it; a validator's whole job is telling you clearly whether it is fine, and if not, exactly where to look. Alongside pass/fail, it summarises the document's shape — how many objects and arrays it contains, how deeply nested it goes — which is often the fastest way to spot that a response has an extra nesting level you weren't expecting.
How to use it
- Paste your JSON into the input panel.
- The status badge updates immediately: green for valid, red for invalid.
- If invalid, the line and column of the problem is shown directly beneath the badge.
- If valid, review the structure summary — type, key count, nesting depth — to sanity-check the shape of the document.
Examples
Invalid — trailing comma
{"id": 1, "name": "Ada",}Invalid — line 1, column 26: Unexpected token '}'Valid
{"id": 1, "name": "Ada"}Valid JSON — object, 2 keys, depth 1