JSON tool
JSON Validator
Check JSON syntax and see a useful error location without sending your data to a server.
Result
Your result will appear here.
How to use JSON Validator
- Paste a JSON document.
- Select Validate to check its syntax and see an error line and column if invalid.
Example
{"valid":true,"items":[1,2,3]}Common use cases
- Checking a hand-edited config.json before committing it, because one missing comma can break a build that reads the file.
- Finding the exact location of a parse error reported by an API client or a log line that says “Unexpected token”.
- Confirming that a generated JSON export is syntactically valid before importing it into another system.
Input and output examples
| Input | Output | Notes |
|---|---|---|
{"valid":true,"items":[1,2,3]} | Valid JSON | The syntax is correct. |
{"a":1,} | Invalid JSON: … (line 1, column 8) | The wording after “Invalid JSON:” depends on the browser. The line and column come from the error position; the trailing comma is at column 7. |
Common mistakes to avoid
- The first reported error is not always the real mistake. A missing closing quote can make every later line look wrong, so fix the earliest error first and validate again.
- Valid syntax is not valid data. {"age": "forty"} is valid JSON, so type and required-field rules must be checked with a schema.
- Trailing commas such as [1, 2,] and single-quoted strings are rejected, even though many JavaScript and YAML files accept them.
Technical details
Validation calls the native JSON.parse, which follows ECMA-404 and RFC 8259. When parsing fails, the tool converts the error position into a line and column number. It checks syntax only, not a JSON Schema such as JSON Schema 2020-12 or any application-specific rule.
Frequently asked questions
Does this validate a JSON schema?
No. It checks JSON syntax only, not a JSON Schema or application-specific rules.
Why does the error message differ from what I saw elsewhere?
Each JavaScript engine words its JSON.parse error differently. The tool keeps the browser’s wording and adds the line and column it calculates from the error position.
Are comments allowed?
No. JSON has no comment syntax. Remove // and /* */ comments before validating. JSONC and JSON5 files need a tool that understands those formats.
If the result says valid, will my API accept the data?
Not necessarily. A valid result means the syntax is correct. Required fields, value types, and limits are not checked, and a JSON Schema validator is needed for those.
Is it safe to paste private data?
The text is parsed in your browser and the tool code does not send it to a server. Still, avoid pasting secrets on a shared computer.
Why is the reported column sometimes at the end of a line?
Some errors, such as a missing closing bracket, are only detected at the end of the input, so the reported position can be the point where the parser gave up rather than the place you typed.