JSON Validator - Check JSON Syntax Online
Check Whether JSON Is Valid
Paste or type JSON and it is checked as you go. Valid input shows a green "Valid JSON" message with a summary of the document: number of keys, maximum nesting depth, and counts of objects, arrays, strings, numbers, booleans and nulls. Invalid input shows the error from your browser's JSON parser and the line and column it refers to. Nothing is uploaded, so payloads with credentials or personal data are safe to paste.
The Errors You Will See Most
- Trailing comma:
{"a": 1,}. Remove the comma before}or]. - Missing comma between two properties or array items, often after adding a line to the middle of a file.
- Single quotes:
{'a': 1}. JSON only allows double quotes. - Unquoted key:
{a: 1}is a JavaScript object, not JSON. - Comments:
//and/* */are not allowed. Strip them with the JSON minifier's JSONC option. - Unescaped characters in strings: a raw line break or tab inside a string, or a Windows path like
"C:\Users", where\Uis not a valid escape. Write"C:\\Users". Worse,"C:\new"is valid but contains a line break, because\nis an escape. - Python or JavaScript values:
True,None,undefinedandNaNare not JSON.
What the Validator Does Not Catch
Duplicate keys such as {"id": 1, "id": 2} are valid
syntax, and most parsers silently keep the last value. Large integers
are valid too, but many languages round anything above 253
when they read it. And valid syntax says nothing about whether the
data has the fields an API expects; use the
JSON Schema validator for
that. Once your JSON is valid, the
JSON formatter will tidy its
indentation.
Related Tools
JSON Formatter & Beautifier
Format and beautify JSON with customisable indentation and syntax highlighting.
JSON Minifier
Minify JSON by removing all unnecessary whitespace for smaller payloads.
JSON Tree Viewer
Visualise JSON as a collapsible tree to explore deeply nested structures.
JSON Path Finder
Click any value in a JSON document to get its path expression.