Home/Guides/JSON unexpected token

JSON unexpected token

Invalid JSON syntax: unexpected character, often a trailing comma or unquoted key.

Common causes

  • Trailing comma after last element.
  • Unquoted key names.
  • Single quotes instead of double.

How to fix

  • Remove trailing commas.
  • Quote all keys with double quotes.
  • Use double quotes for strings.

Use our tool

Validate JSON
All guides