JSON Validator
Validate JSON syntax and pinpoint the failing line and column
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
- 1Paste the JSON you suspect is malformed.
- 2Read the verdict panel: valid input gets a structural overview, invalid input gets the exact line and column.
- 3Work through the four common causes it lists: trailing commas, single quotes, unbalanced brackets, and stray comments.
- 4Once it parses, switch to the JSON formatter if you also want pretty-printed output.
Common errors and how to fix them
| Symptom | Cause | Fix |
|---|---|---|
| Unexpected token } in JSON | There 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 JSON | The 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 toolsJSON Formatter
Format, minify, and validate JSON with line-and-column error reporting
JSON Viewer
Explore JSON as a collapsible tree and read off access paths
JSON Escape / Unescape
Escape and unescape JSON strings
SQL Formatter
Beautify SQL per dialect, including MySQL and PostgreSQL
XML Formatter
Pretty-print or minify XML while checking that every tag is closed
YAML Formatter & Validator
Validate YAML syntax and normalize the indentation