Why is my JSON invalid?
JSON is a strict format: one extra comma, a single quote or an unquoted key and the whole file is rejected. The typical error message (“Unexpected token } in JSON at position 1532”) doesn't do much to help you find the problem.
This validator parses the JSON according to the standard (RFC 8259) and, at the first error, tells you what's going on in plain English, gives you the line and column, and shows that part of the text with a marker underneath. A button takes your cursor to the exact spot so you can fix it and validate again.
If the JSON is valid, you see its root type (object or array), how many keys it has and how deep it goes. It also warns you about duplicate keys within the same object: they're valid JSON, but most programs only keep the last value, and they're usually a hard-to-spot mistake.
How to validate JSON
- Paste the JSON or open a .json file.
- Click “Validate JSON”.
- If there's an error, read the explanation and click “Go to error” to jump to the line.
- Fix it and validate again until you see “Valid JSON”.
Most common JSON errors
- Trailing comma: {"a": 1,} — JSON doesn't allow a comma after the last item.
- Single quotes: {'a': 1} — keys and strings always go in double quotes.
- Unquoted keys: {a: 1} — valid in JavaScript, not in JSON.
- Comments // or /* */ — JSON doesn't support them.
- Values such as undefined, NaN or Infinity, or leading zeros like 007.
- Line breaks inside a string: they have to be written as \n.
Frequently Asked Questions
Which standard does the validator use?
The JSON standard (RFC 8259 / ECMA-404), the same one applied by JSON.parse in JavaScript, by Python and by most languages. It doesn't accept extensions like JSON5 or JSONC (comments and trailing commas).
Does it validate against a JSON Schema?
No. It checks the syntax: that the text is correct JSON. Checking that fields have the types or values your application expects (JSON Schema) is a different job that this tool doesn't do.
Do attempts with errors use up the free try?
No. You can validate, fix and validate again as many times as you need. The free try is only used when you get a valid result.
Is my data sent to a server?
No. Everything is processed in your browser with JavaScript. The text you paste and the files you open never leave your device, so you can safely work with internal or customer data.
Can I validate many files at once?
Yes, with ToolStudio Pro: open several files and you'll see which ones are valid and on which line each of the others fails.
Is it free?
Yes. You can try the tool for free on one document (pasted or a single file) and change the options as often as you like; attempts that end in an error don't use up your free try. For unlimited use and processing several files at once, ToolStudio Pro costs €1.99 a month and includes every tool.