Skip to content

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.

JSON vs. JavaScript: what trips people up

Written asValid JSON?Fix
{name: "Ada"}NoQuote the key: {"name": "Ada"}
{'name': 'Ada'}NoUse double quotes only
[1, 2, 3,]NoRemove the trailing comma
{"zip": 00742}NoQuote it: "00742"
// commentNoDelete comments
{"v": NaN}NoUse null
"line 1\nline 2"YesEscaped newlines are fine

Once it validates, format it, minify it or convert it to CSV.

Questions people ask

What does a JSON validator check?

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.

What are the most common JSON errors?

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.

Why does my browser say “Unexpected token” with no line number?

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.

Does it validate against a JSON Schema?

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.

Is my JSON sent to a server?

No. Validation runs in your browser, so API keys or customer data in the payload stay on your machine.