"Unexpected token o in JSON at position 1" — What It Actually Means
This error almost never means your JSON is broken. It means you called JSON.parse on something that was never a JSON string in the first place — and the letter in the message tells you exactly what you passed.
If you are staring at "Unexpected token o in JSON at position 1", your JSON is probably fine. This error means JSON.parse received a value that was already a JavaScript object, not a string of JSON text. It is one of the most misleading error messages in JavaScript, because it points at the data when the bug is in the call.
Where the "o" comes from
JSON.parse only accepts a string. If you hand it an object, JavaScript quietly converts that object to a string first — and every plain object stringifies to the literal text "[object Object]". The parser then starts reading that text: position 0 is "[", a perfectly valid way to begin a JSON array, so it continues. Position 1 is "o", which is not a valid value, key or bracket. Hence: unexpected token o, at position 1. The "o" you are being warned about is the second letter of the word "object".
The three situations that cause it
The most common by far is double parsing. Methods like fetch's res.json() or axios already parse the response body for you, so calling JSON.parse on the result parses something that is already an object. The second is passing an object straight into JSON.parse when you actually meant JSON.stringify — the two are easy to transpose when you are moving fast. The third is reading from a store like localStorage where a previous write saved an object without stringifying it, so the stored value is the literal text "[object Object]" and it will fail forever until you clear it.
The related errors, and what each letter tells you
The character named in the message is a precise diagnostic, so read it rather than skipping past it. "Unexpected token <" means you received HTML, not JSON — almost always a 404 or 500 error page, a login redirect, or a proxy interception, and the real bug is the request, not the parsing. "Unexpected end of JSON input" means the body was completely empty, typical of a 204 response or a request that failed before returning anything. "Unexpected token }" usually means a trailing comma before the closing brace, which JavaScript object literals allow but JSON strictly forbids. And "Unexpected token '" means single quotes were used for strings, which again is valid JavaScript but invalid JSON.
How to find it in ten seconds
Before changing any parsing logic, log typeof yourValue immediately before the JSON.parse call. If it prints "object", delete the JSON.parse — the value is already parsed and you were about to unparse it. If it prints "string", open the Network tab in your browser devtools and look at the raw response body rather than the pretty-printed preview, because devtools will happily render an HTML error page in a way that looks structured. The raw text tells you the truth in one glance.
Once you have the actual response text, paste it into our JSON formatter — it validates the syntax and points at the exact character where the structure breaks, which is far faster than reading a minified single-line payload by eye. Everything runs in your browser, so it is safe to paste a real API response while debugging.