Most common JSON errors
Trailing comma: a comma after the last item in an object or array isn't allowed ({"a": 1,} is invalid). Unquoted keys: every key name must be wrapped in double quotes ({name: "x"} is invalid; the correct form is {"name": "x"}). Single quotes: JSON requires double quotes, single quotes aren't accepted. Comments: the JSON specification doesn't allow comments of any kind.
What the statistics mean
Root type: whether the entire JSON is an object, an array, or a simple value like a string, number, or boolean. Keys/Items: how many properties the root object has, or how many elements the root array has. Maximum depth: how many nesting levels exist in the structure. Size: the text size in bytes (accounting for special characters and accents, which take up more than 1 byte in UTF-8).
Frequently asked questions
What's the difference between the validator and the JSON formatter?
The formatter focuses on beautifying, indenting, and minifying JSON that's already valid. The validator focuses on quickly checking whether the JSON is correct, pointing to the exact line and column of an error when it isn't, plus showing structure statistics.
Why is my JSON invalid even though it looks correct?
The most common issues are a trailing comma after the last item in an object or array, unquoted keys, single quotes instead of double quotes, or comments inside the JSON — none of these are allowed by the official JSON specification.
What does the "maximum depth" shown in the result mean?
It's the number of nesting levels in the JSON. A simple object with no nested objects or arrays has a depth of 1; each nested object or array adds one more level.
Is the pasted JSON sent to a server?
No. All validation happens locally in your browser, in JavaScript, without sending the content off your device.