Skip to content

JSON Validator

Checks whether JSON is valid and explains each error in plain language, with its exact line and column.

Your JSON stays on this device

This tool runs entirely inside your web browser. Your JSON is processed on your own device and is never sent to our servers. How this works

Waiting for JSON…

JSON Validator is a free tool that checks whether text is valid JSON. If it isn’t, it lists every problem with its line and column number, explains what is wrong in plain language, and suggests a fix. Checking happens in your browser as you type, and your JSON is never uploaded.

How to validate JSON

  1. Paste your JSON into the box, or click Open file to check a .json file.
  2. The result updates as you type: a green tick for valid JSON, or a list of problems.
  3. Click Show next to a problem to jump to it and highlight it.
  4. Fix the first problem, then check the list again. Later problems are often caused by the first one.

Example

This JSON has two mistakes:

{
  "name": "Weekly report",
  "recipients": ["[email protected]",],
  "day": "Monday"
  "time": "09:00"
}

The validator reports:

What it checks

It also warns about duplicate keys, such as two "id" properties in the same object. That is technically valid, but most programs silently ignore all but the last one, so it’s usually a bug.

JSON versus JavaScript objects

JSON looks like JavaScript but is stricter. Code that works in JavaScript, such as { name: 'Ana', }, is not valid JSON because of the unquoted name, the single quotes and the trailing comma. Some tools accept relaxed variants (JSON5, or JSONC with comments, as used by VS Code settings), but APIs and most programs expect strict JSON, which is what this validator checks.

Once your JSON is valid, you can tidy it with the JSON Formatter or generate types from it with JSON to TypeScript.

Frequently asked questions

What makes JSON invalid?

The usual culprits are a comma after the last item in a list or object, single quotes, property names without double quotes, comments, and values such as undefined or NaN that JSON does not support.

Why do I see several errors when I only made one mistake?

One mistake, such as a missing quote, can confuse everything after it. Fix the first error listed and the others often disappear.

What is a duplicate key warning?

The same property name appears twice in one object. It is technically allowed, but most programs silently keep only the last value, which is usually a bug.

Does this validate against a JSON Schema?

Not yet. This checks that the text is well-formed JSON. Checking that it has the right fields and types (JSON Schema validation) is a separate tool.

Last updated

Missing a feature, or need a tool we don’t have? Suggest it.