Valid JSON
{
"name": "Ada",
"tags": ["a", "b"],
"active": true
}The JSON Validator checks whether a document is valid JSON and reports any syntax errors with line and position information so you can fix them quickly. It parses the input against the JSON grammar and flags the exact problem, such as a missing comma, an unterminated string, a trailing comma, or an unquoted key. JSON (JavaScript Object Notation) is a strict, lightweight data format built from objects, arrays, strings, numbers, booleans, and null, and it powers most web APIs and config files.
Validation runs entirely in your browser, so your data is never uploaded or stored on a server, making it safe for payloads that contain sensitive values. Paste a document and instantly learn whether it is well-formed, with a clear error message pointing at where parsing failed. This is ideal for catching malformed API responses, debugging hand-edited config, or confirming a generated file is correct before it is consumed downstream.
The main file is the entry point for each run.
Use the Input panel to pipe standard input to your program when it needs data.
Run sends your code to a fresh hosted runtime and streams the result into the output panel.
Your draft stays in this browser, and Share creates a separate snapshot link.
{
"name": "Ada",
"tags": ["a", "b"],
"active": true
}{
"name": "Ada",
"active": true,
}
// Error: unexpected '}' after trailing comma{
name: "Ada"
}
// Error: property keys must be double-quoted strings{ 'name': 'Ada' }
// Error: strings must use double quotes, not single{
"user": {
"id": 1,
"roles": ["admin", "editor"],
"meta": null
}
}
// Valid: objects and arrays may be nested; null is a permitted value{
"a": 1
"b": 2
}
// Error: expected ',' or '}' after value; members must be comma-separated{ "qty": 007, "price": NaN }
// Error: numbers may not have leading zeros and NaN is not valid JSON[
{ "id": 1, "ok": true },
{ "id": 2, "ok": false }
]
// Valid: a top-level array is legal JSON; each element is a complete object{
"a": 1 // a count
}
// Error: comments are not part of JSON; remove the // ... textThe editor uses Monaco, the engine behind VS Code, with language-aware editing tools and familiar keyboard controls.
Paste a JSON document into the validator
It parses against the JSON grammar and reports pass or fail
Errors point to the exact line and position of the problem
Missing or trailing commas
Unterminated strings and unquoted keys
Mismatched brackets and braces
Validation runs entirely in your browser
Sensitive payloads are never uploaded or stored on a server
Catching malformed API responses
Debugging hand-edited config before it is consumed downstream
No input to validate