A trailing comma — a comma after the last item in an object or array — is not allowed in strict JSON, even though JavaScript object and array literals permit it. It is one of the most common reasons valid-looking JSON fails to parse.
Unexpected token } in JSONUnexpected token ] in JSONExpecting property name enclosed in double quotesJSON follows RFC 8259, which requires a value after every comma. So {"a":1,} and [1,2,] are invalid: the parser reads the comma, then expects another key or value and instead finds a closing } or ]. In JavaScript this surfaces as Unexpected token }; in Python as Expecting property name enclosed in double quotes.
Remove the comma before the closing brace or bracket. If you have many of them, paste the JSON into the validator below to locate each one, or use the JSON Repair tool to strip all trailing commas automatically and re-format the result.
The validator below runs entirely in your browser and flags the exact line and column of the first error.
No. Strict JSON (RFC 8259 / ECMA-404) forbids a comma after the last element of an object or array. This differs from JavaScript, JSON5, and many config formats, which do allow it.
Use the JSON Repair tool — it strips trailing commas (plus single quotes, comments, and unquoted keys) and re-formats. Or paste into the validator below to fix them by hand at the flagged position.
Trailing commas are a JavaScript syntax convenience for editing literals. JSON is a stricter data-interchange subset and deliberately omits them for unambiguous parsing across languages.