Skip to content
JS
JavaScript error

SyntaxError

The JavaScript exception "illegal character" occurs when the lexer reads a character that's not part of a string literal, and the character cannot constitute a valid token in the language.

Reference entryJavaScriptFetched
SyntaxError: Invalid or unexpected token (V8-based)
As listed by MDN Web Docs
SyntaxError: illegal character U+201C (Firefox)
As listed by MDN Web Docs
SyntaxError: Invalid character '\u201c' (Safari)
As listed by MDN Web Docs
Category
SyntaxError
Severity
error
Runtime
both
or press Cmd/Ctrl + Enter. The text is only sent to this site to match it.
Source: MDN Web Docs. Data fetched 2026-09-25T01:48:37.273Z.