Skip to content
Utilboxes

JSON Validator

Check whether JSON is valid and get a clear explanation of any error, with the exact position and a likely cause.

Runs entirely in your browser

How to use the JSON Validator

  1. 1Paste the JSON you want to check.
  2. 2Validation runs as you type.
  3. 3If it fails, read the explanation and the highlighted line.
  4. 4If it passes, review the structure summary underneath.

How it works

Validation uses the strict native parser, so a pass here means a pass anywhere. What this tool adds is interpretation: raw parser errors are terse and vary between engines, so common failure patterns are recognised and translated into a plain sentence naming the likely cause.

A trailing comma, a single-quoted string, an unquoted key, a stray comment, an unescaped newline inside a string and an unbalanced bracket each produce their own message rather than a generic 'unexpected token'.

When the document is valid, a summary reports its depth, the number of keys and arrays, the largest array, and any duplicate keys. Duplicates are worth flagging because JSON permits them but parsers silently keep only the last, which is a genuinely difficult bug to spot by eye.

Everything runs in this page. Nothing you paste is transmitted, logged or stored, which is what makes it safe to drop a production payload in here while you are debugging.

Frequently asked questions

What makes JSON invalid?
Trailing commas, single quotes, unquoted keys, comments, undefined or NaN values, and unescaped control characters inside strings are the usual causes.
Are duplicate keys allowed?
The specification permits them but leaves the behaviour undefined; in practice parsers keep the last one and discard the rest silently. The validator flags them because they are almost always a mistake.
Does it check against a schema?
No. This checks syntax only. Validating structure and types requires a JSON Schema validator, which is a different job.