36 chars · 4 lines
Two-way sync · Edit either side and the other updates automatically.
"active": true36 chars · 4 lines
Two-way sync · Edit either side and the other updates automatically.
"active": trueJSON parser error
Unexpected token is a broad parser message rather than one specific JSON mistake. The checker above preloads an object with a missing comma so you can see that the token highlighted by the parser can be the next property even though the missing punctuation is just before it. This tool is free to use. No account or payment is required.
Last updated
Parsers usually fail when the next token makes the current grammar impossible. A missing comma after one property may therefore be reported at the quotation mark that begins the following property.
When the input comes from an API, log or inspect the raw response before parsing it. That makes it easier to distinguish malformed JSON from an unexpected server response or an extra prefix added by middleware.
The parser reaches the next property name, but the actual fix is to add a comma after the previous string value.
{
"name": "Ada"
"active": true
}{
"name": "Ada",
"active": true
}Common questions
It means the parser encountered a token that is not legal at the current grammar position. The underlying cause may be the token itself or missing syntax immediately before it.
A parser can continue until the next token proves the previous structure is incomplete, so a missing comma is commonly reported at the following key.
Yes. HTML, plain text, login pages, proxy errors, and other non-JSON bodies can all fail when application code tries to parse them as JSON.
Debugging a specific JSON issue? Browse JSON troubleshooting.