JSON Validator

Validate JSON syntax and pinpoint the failing line and column

Runs in your browserDebugging01Formatters & Validators

What is JSON Validator?

A JSON validator parses your input and returns a definitive verdict: valid input gets a report of the root node type and its top-level keys, while invalid input gets the failure position translated into a line and column number, along with the four most common causes ranked by how often they occur. Validation runs entirely in your browser.

How to use JSON Validator

  1. 1Paste the JSON you suspect is malformed.
  2. 2Read the verdict panel: valid input gets a structural overview, invalid input gets the exact line and column.
  3. 3Work through the four common causes it lists: trailing commas, single quotes, unbalanced brackets, and stray comments.
  4. 4Once it parses, switch to the JSON formatter if you also want pretty-printed output.

Common errors and how to fix them

SymptomCauseFix
Unexpected token } in JSONThere is an extra comma after the last item, and the JSON specification does not allow trailing commas.Delete the comma that follows the final element of the object or array.
Unexpected token / in JSONThe document contains // or /* */ comments.Remove the comments, or switch to a format that supports them, such as JSON5 or YAML.

Frequently asked questions

What is the difference between a JSON validator and a JSON formatter?+

A formatter takes valid JSON and makes it readable; a validator tells you where invalid JSON breaks. Both share the same parsing core, but the validator converts the parser's error offset into a line and column and hands you a checklist of causes ordered by probability.

Why does my backend accept this JSON when the validator rejects it?+

Many server-side libraries are more permissive than the specification and quietly accept trailing commas, single quotes, or comments. This tool validates strictly against the JSON spec, so it surfaces the problems that would break the moment your payload reaches a different parser.

Related tools

All tools