JSON Validator

Check whether a JSON document is valid. Errors show the line, column and a caret under the offending character; valid documents are also checked for duplicate keys and unsafe integers.

Loading tool…

About the JSON Validator

This validator uses a hand-written strict parser instead of relying on the browser's JSON.parse message, so every browser reports the same precise position. The result box quotes the offending line with a caret (^) under the character where parsing stopped, and explains the likely cause — for example Missing comma between properties or Property names must be wrapped in double quotes.

It also reports problems that are technically valid JSON but cause real bugs. Duplicate keys: RFC 8259 says names should be unique, and when they are not, behaviour differs between parsers — JSON.parse and Python keep the last value, some streaming parsers keep the first, and security tools may see a different value than your application. Each duplicate is listed with its path (for example $.billing.currency) and both line numbers. Unsafe integers above 253 − 1 are flagged because JavaScript rounds them.

Validation checks syntax only. To check that fields have the right types or required properties you need a JSON Schema validator. The document never leaves your browser, so it is safe to paste configuration files or API payloads that contain internal data.

How to use it

  1. Paste your JSON or open a file.
  2. Read the result above the editors: green means valid.
  3. If invalid, go to the reported line and column; the caret marks the character.
  4. Review any duplicate-key warnings and rename or remove them.

Frequently asked questions

Are duplicate keys allowed in JSON?
The grammar does not forbid them, but RFC 8259 says names SHOULD be unique and warns that behaviour is unpredictable otherwise. Most JavaScript and Python parsers keep the last value without any warning, which is why this tool lists them.
Why is the error column after the real mistake?
A parser only notices a problem when it reaches a character that cannot continue the document. A missing comma after line 3 is therefore reported at the start of the next property on line 4. Look just before the caret.
Is a single string or number valid JSON?
Yes. Since RFC 7159, any JSON value — including "text", 42 or null — is a valid top-level document. Some older APIs still expect an object or array.
Does this validate against a JSON Schema?
No, it checks syntax only. Schema validation (types, required fields, formats) needs the schema itself and a validator such as Ajv.

Related tools