Structured Data

JSON Validator

Paste JSON to check it instantly. Invalid input is reported with the exact line and column, a plain-language explanation and a snippet that points at the problem — all in this tab.

Runs in your browser v1.0.0

JSON input

paste or type

Validated with a strict parser in this tab. Press Ctrl/⌘ + Enter to check immediately. Nothing is uploaded.

Validation

live

Paste JSON to validate.

How it works

The input is checked against the JSON grammar (RFC 8259) by a small parser that runs in this tab. Unlike a bare JSON.parse error, it always reports a line and a column, explains the problem in plain language, and shows a snippet with a caret marking the exact spot. Valid documents are summarised with their root type, key and item counts, maximum depth and size. Duplicate keys are surfaced as warnings without failing the document, because that is how JSON.parse treats them.

Practical uses

Check whether a JSON document is valid and get a precise location for the first error.

Common ways to use it

  • Verify a config file before committing it.
  • Confirm an API payload is valid JSON and find where it breaks.
  • Spot duplicate keys that JSON.parse would silently accept.

Trailing comma in an object

Input

{
  "a": 1,
}

Output

Invalid JSON
Line 3, column 1: Trailing comma before '}' is not allowed.
Hint: Remove the comma before the closing brace.

Verified with the tool's analyze() and report functions. The same page reports a document with duplicate keys as valid and lists the repeated keys as warnings instead.

Options that matter

  • Flag duplicate keys — list repeated keys with a JSON path, line and column as warnings without changing validity (on by default).

Things to keep in mind

  • Uses the browser's JSON parser, so the same strict rules apply: no comments and no trailing commas.
  • Duplicate keys are warnings, not errors, because JSON.parse accepts them and keeps the last value.
  • Only the first syntax error is reported; fix it and re-run to find the next one.