JSON Validator
This JSON validator checks that JSON is valid, finds the exact position of any error, and also catches duplicate keys and numbers too large for JavaScript.
What you get
- Validate JSON online with the exact line of any error: a JSON syntax checker that also finds duplicate keys and numbers too large for JavaScript.
- Valid JSON is shown formatted, ready to copy.
- Find JSON errors fast: the message names the line and position, and the most common mistakes are explained below.
- Private and free: everything runs in your browser, nothing is uploaded, and there is no sign-up.
How each result is checked
- Parsed strictly as RFC 8259 JSON: trailing commas, comments, single quotes and unquoted keys are errors, with their position.
- Duplicate keys in the same object are found and reported.
- Integers that JavaScript cannot store exactly (above 2^53) are reported.
- Valid JSON is shown formatted, and that output is checked to hold the same data.
What can't convert exactly
- JSON with comments (JSONC) or trailing commas is not valid JSON; tools that accept it use a different parser.
Questions
Why does it warn about duplicate keys if the JSON is valid?
The JSON standard allows them but says behaviour is unpredictable; in practice parsers keep the last value and silently drop the others.
Is my data uploaded?
No. Everything runs in your browser, in a background worker. Nothing is sent to a server.
Why is my JSON invalid?
The most common causes are a trailing comma after the last item, single quotes instead of double quotes, keys without quotes, comments, and an unescaped quote or line break inside a string. The error shows the line and position, so you can check json syntax at the exact spot.
Does it accept JSON with comments (JSONC or JSON5)?
No. Comments, trailing commas and single quotes are not valid JSON, and most JSON parsers reject them, so this validator reports them as errors.
How do I use the JSON Validator online?
Paste your input or open a file on the left. The result appears on the right as you type, already checked; copy or download it. Nothing is uploaded: the JSON Validator runs in your browser.