JSON Validator
Validate JSON instantly with detailed error messages, line/column indicators, and structure stats.
About this tool
JSON (JavaScript Object Notation) has a strict formal grammar defined by RFC 8259 and ECMA-404. Valid JSON must use double-quoted strings, commas between elements but not after the last one, brackets [] for arrays, braces {} for objects, and specific escape sequences within strings. Even a single syntax error makes the entire document unparsable, though error reporting from parsers varies in helpfulness.
Common validation errors: missing or extra commas, mismatched brackets or braces, single-quoted strings, trailing commas after the last array element or object property, control characters (tab, newline) within strings that are not escaped as \t or \n, numbers with leading zeros (01 is invalid, 1 is valid), and bare values that are not valid JSON types (undefined, NaN, Infinity are JavaScript values but not valid JSON).
Syntax validation catches format errors — it verifies the document is parseable. Schema validation is a separate, higher-level step that verifies the content matches expected structure and types (using JSON Schema). Production systems should validate external data (API responses, user uploads, configuration files) against a schema before using it. JSON parsers in different languages handle edge cases differently: JavaScript loses precision for integers larger than 2^53 (Number.MAX_SAFE_INTEGER), and handling of duplicate object keys varies between parsers.