JSON Validator

Check JSON syntax and get the exact line and column of any error.

JSON Runs in your browser
JSON
Validation report

Nothing checked yet

Paste JSON and press Validate. You will get either a structural summary or the exact position of the first syntax error.

Runs entirely in your browser. Your data isn't uploaded — this page makes no network request with anything you type, which you can verify in your browser's network tab. How this works.

What is the JSON Validator?

A JSON validator answers one question precisely: is this document valid JSON, and if not, exactly where does it break? Most "invalid JSON" errors in the wild are a missing comma, a smart quote pasted from a document, or a trailing comma left behind after deleting a field.

Rather than just saying no, this validator reports the line and column, shows the offending region in context, and summarises the document you did get: depth, key count, array sizes and duplicate keys — the things that usually explain why a downstream parser behaved oddly.

How to use it

  1. Paste the JSON you want to check, or upload a file.
  2. Press Validate (or Ctrl/Cmd + Enter).
  3. If it is invalid, read the error line and column, and use the highlighted marker in the editor to jump straight to the problem.
  4. If it is valid, review the structure summary for duplicate keys and unexpected nesting depth.

Example

A trailing comma is the most common cause of invalid JSON.

Input
{
  "retries": 3,
  "timeout": 30,
}
Result
Invalid JSON
Line 3, column 3
Unexpected token } — a value was expected after the comma on line 2.

Features

  • Exact line, column and character offset for syntax errors
  • Inline error markers in the editor
  • Duplicate key detection (valid JSON, but usually a bug)
  • Structure summary: type, depth, key and node counts
  • Detects common paste damage such as curly quotes and non-breaking spaces

Frequently asked questions

Does this validate against a JSON Schema?
Not yet — this checks syntax and structure. JSON Schema validation is a separate tool on the roadmap, because schema errors need a very different presentation from syntax errors.
My JSON is valid here but my API rejects it. Why?
Usually a semantic rather than syntactic problem: a required field is missing, a number is sent as a string, or the payload is nested one level deeper than the endpoint expects. It can also be an encoding issue — check for a UTF-8 byte-order mark at the start of the file.
Are duplicate keys invalid?
The JSON specification allows them but does not define the behaviour. In practice most parsers keep the last value and silently discard the others, which is why they are flagged here as a warning.
Esc

Loading the catalog…