Guide
Fix JSON Unexpected Token Errors
Unexpected token means a strict JSON parser reached a character that cannot appear at that position in valid JSON.
What Unexpected token means
A JSON parser reads the document from left to right. When it reports Unexpected token, the parser found a character that does not match the JSON grammar at that point. The reported character is a clue, but the real mistake can be just before it.
Common tokens and causes
The token often points to JavaScript syntax or copied text that looks close to JSON but is not strict JSON.
- Unexpected token ' means a single-quoted string or key should use double quotes
- Unexpected token , often means there is a trailing comma
- Unexpected token / usually means a JavaScript comment was copied into JSON
- Unexpected token T, F, or N often means True, False, or None should be true, false, or null
- Unexpected token after JSON value means extra text appears after the document ends
Broken example
{ name: 'Ada', active: True, }
Fixed JSON
{ "name": "Ada", "active": true }
Repair workflow
Paste the payload into JSON Fix, run Repair & Format, then run Validate. If the error remains, check the exact line and column, then inspect the character immediately before the highlighted token.