Guides
Plain-language explanations of the errors developers actually hit — what they mean, what causes them, and how to fix them. Every guide links to the matching in-browser tool so you can locate the exact line in your own data.
JSON parse errors
- “Unexpected token '<' in JSON at position 0”The most common JSON.parse error, explained: your code received HTML (usually an error page) instead of JSON. How to find the real response and fix it.
- “Unexpected end of JSON input”JSON.parse("") and truncated payloads both throw “Unexpected end of JSON input”. The three situations that produce it and how to guard against each.
- “Unexpected token o in JSON at position 1”This error means you called JSON.parse on a JavaScript object instead of a JSON string — it was coerced to "[object Object]". Why it happens and the one-line fix.
- “Expected property name or '}' in JSON at position 1”Unquoted keys and single quotes are valid JavaScript but invalid JSON. Why {a: 1} and {'a': 1} throw this error, and how to convert them to strict JSON.
- “Expected double-quoted property name in JSON”Usually a trailing comma: {"a": 1,} makes the parser expect another "key" after the comma. All the ways this error appears and how to fix each.
- “Expected ',' or '}' after property value in JSON”A missing comma between properties or unquoted string values make the parser stop right after a value. How to read the position and fix the document.
- “Unexpected non-whitespace character after JSON”A complete JSON value followed by more content: concatenated API responses, log lines, or a JSONL file parsed as JSON. What it means and how to handle each case.
- “JSON.parse: unexpected character at line 1 column 1”When the very first character is wrong: HTML responses, a UTF-8 BOM, invisible characters, or a completely different format. How to diagnose each in seconds.