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.

JSON

JSON

Waiting for input

What you get

How each result is checked

  1. Parsed strictly as RFC 8259 JSON: trailing commas, comments, single quotes and unquoted keys are errors, with their position.
  2. Duplicate keys in the same object are found and reported.
  3. Integers that JavaScript cannot store exactly (above 2^53) are reported.
  4. 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.