Validate JSON instantly. See clear error messages. Supports both strict JSON and lenient mode with comments and trailing commas.
JSON validation is the process of checking whether a JSON string conforms to the JSON specification. A validator ensures your data is syntactically correct, making it safe to parse and use in your applications.
JSON comes in two flavors: strict (standard JSON specification) and lenient (allowing comments and trailing commas, common in configuration files). Understanding the difference helps you catch errors early and debug data issues faster.
The most frequent JSON syntax errors include:
{"key": "value",} — valid in lenient mode, invalid in strict JSON.{'key': 'value'} — JSON requires double quotes.{"key": "value"} // comment — valid in lenient mode, invalid in strict JSON.{key: "value"} — all keys must be quoted.{"a": 1 "b": 2} — elements must be separated by commas.{"key": [1, 2, 3} — arrays and objects must close correctly.Strict JSON follows the official JSON specification exactly. It's the standard for APIs, web services, and data interchange. If your JSON fails strict validation, it cannot be parsed by standard JSON parsers.
Lenient mode is more forgiving and supports JavaScript-like syntax, including:
///* */Lenient mode is perfect for configuration files (like tsconfig.json or .babelrc) where readability and comments matter. Use strict validation when working with APIs and data formats.