QuietJSON

Common JSON Syntax Errors & Solutions

Detailed technical references and step-by-step resolution guides for the most frustrating errors encountered when working with JSON in web development, APIs, and modern data pipelines.

Unexpected token < in JSON at position 0

API Response
SyntaxError: Unexpected token '<', "<!DOCTYPE "...

Occurs when an API endpoint returns an HTML error page (such as 404 Not Found or 500 Internal Server Error) instead of the expected JSON payload.

View full diagnosis & fix guide →

Python-Style Literals (True, False, None)

Syntax Error
SyntaxError: Unexpected token 'True' / 'None'

Happens when copying dictionaries directly from Python, Jupyter notebooks, or Django outputs where booleans are capitalized and null is named None.

View full diagnosis & fix guide →

Duplicate Keys in JSON Objects

Semantic Warning
Warning: Duplicate key "id" detected

RFC 8259 specifies that JSON object keys should be unique. Duplicate keys cause unpredictable parser bugs where values are silently overwritten or dropped.

View full diagnosis & fix guide →

Windows File Path Backslash Escapes

Silent Corruption
Warning: Corrupted Windows path escape (\t, \n)

Single backslashes in Windows file paths like C:\temp or C:\notes are interpreted as JSON escape sequences (tabs or newlines), silently corrupting file paths.

View full diagnosis & fix guide →

Trailing Commas Before Closing Braces

Syntax Error
SyntaxError: Unexpected token '}' at line X

JavaScript, TypeScript, and Python permit trailing commas, but strict JSON (RFC 8259) forbids a comma after the final property in an object or array.

View full diagnosis & fix guide →

Need to validate or auto-fix broken JSON right now?

Paste your payload into QuietJSON's free online tools — 100% private and runs locally in your browser.

JSON Formatter & ValidatorAuto-Repair Broken JSON