JSON Validator
Validate JSON syntax with real-time error detection and line numbers.
Invalid JSON
What is JSON Validation?
JSON validation checks whether your JSON text conforms to the JSON specification (RFC 8259). A valid JSON document has properly quoted keys, correctly nested brackets and braces, no trailing commas, and no comments.
This validator parses your JSON entirely in the browser and reports the exact line and position of any syntax error — no data is ever sent to a server.
Common JSON Syntax Errors
- Trailing comma after the last property or array element
- Single quotes used instead of double quotes
- Unquoted object keys
- Missing comma between properties
- Unclosed brackets
{or[ - JavaScript comments (
//or/* */) — not valid in JSON - Undefined, NaN, or Infinity values — not valid JSON primitives
FAQ
Is my JSON sent to a server?
No. All validation runs in your browser using the native JSON.parse API. Your data never leaves your device.
Why does Chrome show a different error position than Firefox?
Different browsers implement JSON.parse error messages differently. This tool normalises the message to extract the most useful line number it can find.
Does this support JSON5 or JSONC?
No. This validates standard JSON (RFC 8259). Comments and trailing commas are intentionally rejected.
What do the stats in the status bar mean?
"Keys" counts all properties across the entire object tree. "Depth" is the maximum nesting level. "Bytes" is the UTF-8 byte size of the input.