JSON validator
Check whether your JSON is valid.
Your result will appear here.
Enter your input, then run the tool.How to use the json validator
Check whether a piece of text is valid JSON. The tool reports success or the browser parser’s error.
Paste JSON and run the tool; fix any reported syntax problem and try again.
- Paste your JSON into Input; it starts with {"valid":true}.
- Press Run tool.
- Valid input shows “Valid JSON.” Otherwise an error from your browser’s JSON parser appears.
- Fix the reported spot and run it again. Chrome and Edge give a position counted from 0, plus a line and column.
Good to know
- Uses standard JSON parsing, so comments and trailing commas are rejected.
- Checks syntax only; it does not validate against a schema.
- Valid input returns the text “Valid JSON.”
- Input is limited to 500,000 characters and checked in your browser.
Examples
- {"valid":true} → Valid JSON.
- {"a":1,} → in Chrome: “Expected double-quoted property name in JSON at position 7 (line 1 column 8)”, pointing at the } after the trailing comma.
- 42 and "hi" → Valid JSON. A single number or string is a complete JSON document.
If something goes wrong
Expected property name or '}' in JSON at position 1
Keys need double quotes. Change {a:1} or {'a':1} to {"a":1}.
Unexpected non-whitespace character after JSON
Something follows the first complete value: a second object (as in JSON Lines), a comment or stray text. Check one value at a time, or wrap several in [ ] separated by commas.
Unexpected end of JSON input
The input is empty or cut short, for example missing a closing } or ]. Paste the whole document.
The error wording differs between browsers.
Messages come from the browser’s built-in parser, so Chrome, Firefox and Safari word them differently. For a line, a column and a Go to line button, use the JSON option in Code formatter.
Questions
Does it check required fields?
No. It checks JSON syntax, not the shape of the data.
Can JSON contain comments?
No. Standard JSON comments are rejected.
Does validation change my input?
No. It only returns a success message or an error.
Are duplicate keys reported?
No. {"a":1,"a":2} is reported as valid JSON. Most parsers then keep only the last value.
Next steps: JSON formatter · JSON minifier
