How to use JSON Validator
- Paste the JSON or drop a file into the left box.
- Press Validate, or just wait a moment, validation runs as you type.
- A green bar means the document is valid and shows how many values it contains. A red bar shows the problem and the line.
About JSON Validator
A validator answers one question: will a strict JSON parser accept this text? That is the same test your server, your database or your app will apply, so it is better to find out here than in production.
We use a strict parser written for this site, not the one built into the browser, because browsers tend to give vague messages like "Unexpected token } in JSON at position 41". Ours tells you the line, the column and what it expected instead.
Mistakes people make most often
Almost every invalid document comes down to a short list: a comma after the last element, single quotes, comments, keys without quotes, a missing comma between two items, or an unescaped line break inside a string. All of them are flagged with a specific message here.
If your data comes from a JavaScript object literal or a config file that allows comments, try the JSON5 validator instead. JSON5 is a relaxed cousin of JSON that accepts those things.