JSON validator
Paste JSON and see immediately whether it is valid. If it isn’t, you get the exact line and column, a caret under the problem and a plain-English fix.
Paste JSON and see immediately whether it is valid. If it isn’t, you get the exact line and column, a caret under the problem and a plain-English fix.
| Written as | Valid JSON? | Fix |
|---|---|---|
{name: "Ada"} | No | Quote the key: {"name": "Ada"} |
{'name': 'Ada'} | No | Use double quotes only |
[1, 2, 3,] | No | Remove the trailing comma |
{"zip": 00742} | No | Quote it: "00742" |
// comment | No | Delete comments |
{"v": NaN} | No | Use null |
"line 1\nline 2" | Yes | Escaped newlines are fine |
Once it validates, format it, minify it or convert it to CSV.
That the text follows the JSON grammar in RFC 8259: one top-level value; objects with double-quoted keys; strings in double quotes with valid escapes; numbers without leading zeros; only true, false and null as bare words; no trailing commas and no comments.
Trailing commas after the last item, single quotes instead of double quotes, unquoted keys, comments, and numbers with leading zeros such as 07. These are all valid JavaScript but invalid JSON, which is why copying an object literal out of code often fails.
JSON.parse in some engines only reports a character offset. This validator walks the text itself, so it can report the exact line and column and explain the likely cause in plain English.
No. It checks syntax, which is whether the text is JSON at all. Schema validation checks whether valid JSON has the fields and types a particular API expects, and needs the schema document as a second input.
No. Validation runs in your browser, so API keys or customer data in the payload stay on your machine.