JSON Validator
Validate your JSON data and find syntax errors with detailed error messages including line numbers and character positions.
JSON Input
1 linesValidation Result
Common JSON Errors
What This Validator Actually Checks
JSON has a much smaller grammar than most people expect. This validator parses your input against the rules in RFC 8259 (the current JSON specification) and ECMA-404, which is the same grammar browsers and Node.js apply when they runJSON.parse(). If a document validates here, it will parse in JavaScript.
The six value types, and nothing else
A JSON value can only be a string, a number, an object, an array, true, false, or null. There is no date type, no comment syntax, and no undefined. Dates travel as strings, usually in ISO 8601 form, and the receiving code is responsible for parsing them back.
Number rules that catch people out
JSON numbers are stricter than JavaScript literals. Leading zeros are rejected, so 01 is invalid. A decimal point needs a digit on both sides, so .5 and 5. both fail while 0.5 passes. Hex literals, NaN, and Infinity are not part of the grammar at all. That explains why serializing them from another language often produces output that won't round-trip.
Valid JSON that still loses data
Two cases pass validation and still break things downstream. The first is duplicate keys: the specification permits them but doesn't define which one wins, and JavaScript keeps the last occurrence silently, so {"id": 1, "id": 2} parses to an id of 2. The stats panel above reports the key count, which is a quick way to spot a document with more keys than you expected.
The second is integer precision. JavaScript stores every number as a 64-bit float, so any integer above 9,007,199,254,740,991 loses accuracy on parse. Large database IDs and Twitter-style snowflake IDs hit this constantly. That is why APIs that deal in big identifiers usually send them as strings instead of numbers.
JSON, JSONC, and JSON5 are different formats
If your file came from a config directory, it may not be plain JSON. JSONC adds // and /* */ comments and is what VS Code uses for its settings files. JSON5 goes further and allows trailing commas, single-quoted strings, and unquoted keys. Both are deliberately invalid as strict JSON, so errors about comments or trailing commas usually mean the file is one of these relatives rather than genuinely broken.
One last thing worth checking if the error message makes no sense: a byte order mark at the start of a file is invisible in most editors but causes an immediate parse failure, because RFC 8259 doesn't permit one.
Related Tools
Explore more free tools to boost your productivity
JSON to XML Converter
Convert JSON objects to XML format for data interchange
YAML to JSON Converter
Convert YAML configuration files to JSON format
Text to HTML Converter
Convert plain text to HTML with proper tags and encoding
Slug Generator
Convert any text to URL-friendly slugs for SEO
UUID Generator
Generate unique UUIDs v1, v4, and v5 for your projects
JSON Formatter
Format and pretty-print JSON with syntax highlighting