JSON Validator
Validate JSON and get the exact line, column and cause of every syntax error, with a one-click repair.
Input
Output
Ready
Drop a file to load it
About this tool
Check whether a document is valid JSON and, if it is not, find out precisely why. Errors report the line and column, show the offending line with a caret underneath, and explain the rule that was broken.
When you would use it
- Confirming a config file will parse before deploying it
- Locating the syntax error in a payload a service rejected
- Checking for duplicate keys, which most validators ignore
Worked example
{
"name": "Ada",
"roles": ["admin",],
}
Line 3, column 21
Trailing comma before "]"
3 | "roles": ["admin",],
| ^
Remove the comma after the last element.
Things worth knowing
- Validation is strict by default: comments, trailing commas, single quotes and unquoted keys are all errors, because that is what
JSON.parsedoes. - Duplicate keys are valid JSON but almost always a bug, so they are surfaced as warnings rather than errors.
Questions
Frequently asked
What counts as valid JSON?
Exactly one top-level value, double-quoted keys and strings, no comments, no trailing commas, no leading zeros on numbers, and no
NaN or Infinity. Anything JSON.parse accepts, this accepts.Is my data uploaded anywhere?
No. Every tool on JSONWorks runs entirely in your browser using JavaScript. Your input is never sent to a server, never logged and never stored. The simplest proof is to disconnect from the internet — the tools keep working. The site does load Google Fonts and a Google Analytics page-view tag, so you will see those two requests in your network tab, but neither receives anything you type or paste.
Does it work offline?
Yes. JSONWorks is installable as a progressive web app and caches itself on first visit, so every tool keeps working without a connection.
Related