JSON syntax problem
Find an “Unexpected Token” JSON Error
Locate malformed JSON syntax, understand the reported position, and validate the corrected document before conversion.
Use the matching tool
Validate JSON
What the error actually means
Unexpected token is a general parser message: the parser found a character that cannot appear at the current position. The character named in the error is often where parsing finally failed, not where the original mistake began.
Likely causes
- A property name or string uses single quotes instead of double quotes.
- A trailing comma appears before a closing bracket or brace.
- A quote or closing brace is missing earlier in the document.
- The input is JavaScript, NDJSON, or a server error page rather than one JSON value.
Strict JSON syntax
Problem
{'name': 'Ada',}Correct pattern
{"name": "Ada"}A safe repair workflow
- 1Paste or load the exact response body into the JSON validator.
- 2Go to the reported line and column, then inspect the preceding structure as well.
- 3Correct one syntax error at a time and validate again.
- 4Only convert or minify the document after it validates as one complete JSON value.
How to verify the result
A file that downloads successfully is not automatically a correct file. Check the result at both the structural and business-data levels:
- Validation completes without a syntax error.
- Strings and property names use double quotes.
- Array and object delimiters are balanced.
- The root type is what the consuming tool expects.
Read the deeper guides
Convert JSON to CSV (Developer's Guide)Convert JSON records to CSV while making deliberate choices about nested objects, arrays, missing keys, and column structure.Convert CSV to JSON (Complete Guide with Examples)Learn how to convert CSV files to JSON format. Handle nested objects, arrays, and complex transformations with practical examples.