JSON Validator & Syntax Linter
Validate JSON online with strict RFC 8259 syntax checking. Catches trailing commas, single quotes, unquoted keys, and syntax errors with exact line numbers.
Frequently Asked Questions
How do I validate JSON syntax online?
Paste your JSON into the editor. The validator instantly checks the payload against official IETF RFC 8259 syntax specifications and highlights any syntax errors with exact line and column numbers.
What is JSONLint and how does this validator compare?
JSONLint is a classic JSON syntax validator. JSON2X provides identical strict RFC 8259 validation, plus modern dark mode, instant keystroke validation, structural statistics (depth, keys, arrays), and zero server uploads.
What are the most common JSON syntax errors?
The most frequent errors include: trailing commas after the last array/object item, using single quotes ('str') instead of double quotes ("str"), unquoted property keys, JavaScript comments (// or /* */), and missing closing brackets.
Does standard JSON support comments (// or /* */)?
No. Standard JSON (RFC 8259) does not support comments of any kind. If you need comments in configuration files, consider formats like JSONC, JSON5, YAML, or TOML.
Why are single quotes invalid in JSON?
The JSON specification strictly mandates double quotation marks (") for all string literals and property names. Single quotes are valid in JavaScript object literals, but invalid in JSON strings.
What does "Unexpected token" or "Unexpected end of JSON input" mean?
"Unexpected token" means the parser encountered a character where it was not expected (e.g. a misplaced comma or colon). "Unexpected end of input" means brackets or quotation marks were opened but never closed before the end of the file.
Can JSON keys be numbers or unquoted identifiers?
No. In valid JSON, every key must be a double-quoted string (e.g. {"123": "value"}). Unquoted keys like {name: "Alice"} or numeric keys like {1: "val"} will fail validation.
What RFC specification does this JSON validator enforce?
It strictly enforces IETF RFC 8259 (and ECMA-404), which defines the universal grammar for JavaScript Object Notation data exchange.