JSON Validator

Paste JSON to find out if it's valid — and if not, exactly where and why it isn't.

Runs in your browser — nothing you enter is uploaded

JSON Validator

Press Ctrl+Enter (or Cmd+Enter) to validate

Tip: press Ctrl+Enter (Cmd+Enter on Mac) inside a text box to run.

Your result will appear hereFill in the fields and press “Validate JSON”.

Formula

  • JSON text → value (grammar of RFC 8259)
  • Valid means the text parses as exactly one JSON value with nothing after it.

The parser either reaches the end cleanly or stops at the first mistake and tells you where.

Worked example

Valid JSON

JSON
{"id":1,"tags":["a","b"],"ok":true}

Result

Valid JSON ✓

Top-level type: object

Nesting depth: 3

Objects: 1

How it works

The validator follows the JSON grammar strictly: keys and strings use double quotes, no trailing commas, no comments, no leading zeros, and no NaN or undefined. When it finds a problem it stops at the first one and reports the line and column, with a short excerpt and a caret under the position.

When the JSON is valid you also get its shape — top-level type, nesting depth and counts of objects, arrays, keys, strings, numbers, booleans and nulls — plus warnings for duplicate keys and for whole numbers too big for JavaScript to hold exactly. To tidy valid JSON use the JSON Formatter; to compress it use the JSON Minifier.

Assumptions and limits

  • Only the first error is reported.
  • 5 MB limit.