JSON Validator

Paste JSON to check it. If something is wrong you see the line, the reason and a one-click fix. Nothing is uploaded. More data tools

Check JSON and fix errors in one click

This JSON validator tells you whether your text is valid JSON and, when it is not, shows the line and column, a few lines of context and a plain explanation such as "trailing comma before }" or "single quotes are not allowed". Press Repair JSON automatically to fix common problems: single quotes, unquoted keys, comments, trailing commas, Python-style True, False and None.

When the JSON is valid you also get a summary: type, number of keys, depth and a count of each value type. The validator warns about duplicate keys, which JSON.parse accepts silently and which often hide real bugs.

Try the Try broken JSON button to see the error help in action.

Features

  • Live: the result updates while you type.
  • Clear errors: the line, the reason and, where possible, a one-click fix.
  • Open and drop files, copy or download the result, and share your input as a link.
  • Send to another tool: pass the result straight to a related tool.
  • Private: Everything runs in your browser. Your data is not uploaded to any server.

Related data tools

  • JSON Minifier: Paste JSON and get the smallest valid version. You see how many bytes you saved.
  • JSON Stringify: Convert JSON to an escaped one-line string for your code, or turn an escaped string back into readable JSON.
  • Sort JSON Keys: Put every object key in order, at all levels. Great before comparing or committing JSON.
  • JSON Tree Viewer: See JSON as a tree you can expand, search and copy paths from.
  • JSON Compare: Paste two JSON documents and see exactly what was added, removed or changed.
  • JSON Path Evaluator: Type a JSONPath and see what it matches in your JSON, live.
  • All DataMint tools

Frequently asked questions

What makes JSON invalid?

The most common causes are a trailing comma, single quotes instead of double quotes, keys without quotes, comments, and a missing comma or bracket.

Can it repair broken JSON?

Yes. The repair button fixes the common mistakes above. Always read the result before you use it, because the tool has to guess what you meant.

Does it find duplicate keys?

Yes. Duplicate keys are listed with their line numbers.

Is my data private?

Everything runs in your browser. Your data is not uploaded to any server. You can even use the tool offline once the page has loaded.

How big a file can I use?

Files up to about 20 MB open fine on a modern computer. Very large inputs switch Live mode off so the page stays fast; press Run instead.