SyntaxError: Unexpected token o in JSON at position 1: what it means and how to fix it

TL;DR: Validate locally, fix the first real error, validate again (no upload).

Troubleshoot SyntaxError: Unexpected token o in JSON at position 1 quickly and validate JSON locally (no upload).

What the error means

SyntaxError: Unexpected token o in JSON at position 1 means the parser expected valid JSON but encountered a character/token that cannot appear there. In practice, it usually means the input is not JSON (or not strict JSON), or it is incomplete.

Most common real-world causes

  • You passed an object into JSON.parse (it becomes the string [object Object]).
  • You are parsing something that is already parsed (double-parse).
  • You are parsing a non-JSON response like ok/ok\n/object.
  • A logger/debugger prepended text before the JSON payload.
  • A client library returned an object, but you treated it as JSON text.

Fast debugging steps

  • Check typeof: the value should be a string before parsing.
  • If it is an object, remove JSON.parse (or stringify before storing).
  • If it is [object Object], trace where implicit string conversion happens.

Code example (node)

// Classic reason for "Unexpected token o" at position 1:
JSON.parse({});
// coerces to "[object Object]" -> token "o" at position 1

// Fix: only parse strings
if (typeof value === 'string') JSON.parse(value);
else value;

Fix without uploading data

If the JSON contains sensitive data, validate and fix it locally. No Upload Tools runs 100% in your browser.

Workflow: validate -> fix the first error -> validate again -> export/convert.

FAQ

Does the exact token matter? Yes. The token often hints at the root cause: < is usually HTML, u is often undefined, and / often points to comments.

Should I just regex-fix JSON? Avoid blind regex edits. Validate after each change so you know what you fixed and what broke.

Privacy & Security
All processing happens locally in your browser. Files are never uploaded.

Quick fix checklist

  • Reproduce the error on a minimal input.
  • Check type/format and field mapping.
  • Apply the smallest safe fix.
  • Validate on production-like payload.

Next pages to check

Closest crawled pages without impressions yet. Added to speed first-impression conversion.

neighbor csharp csharp stj could not be converted system string token checklists data imneighbor csharp csharp stj could not be converted system string token checklists multi tneighbor csharp csharp stj could not be converted system string token workflows api gateneighbor csharp csharp stj could not be converted system string token workflows edge funneighbor csharp csharp stj could not be converted system string token workflows enterprineighbor csharp csharp stj could not be converted system string token workflows multi teneighbor csharp csharp stj could not be converted system string token workflows webhooksneighbor csharp go json cannot unmarshal bool into field token type string runbooks edgeneighbor csharp go json cannot unmarshal bool into field token type string workflows ananeighbor csharp go json cannot unmarshal bool into field token type string workflows apineighbor csharp go json cannot unmarshal bool into field token type string workflows entneighbor csharp go json cannot unmarshal number into field token type string runbooks muneighbor csharp go json cannot unmarshal number into field token type string troubleshooneighbor csharp go json cannot unmarshal number into field token type string workflows aneighbor csharp go json cannot unmarshal number into field token type string workflows dneighbor csharp go json cannot unmarshal number into field token type string workflows eneighbor csharp go json cannot unmarshal number into field token type string workflows mneighbor csharp go json cannot unmarshal number into field token type time time workflow