JSON Validator
Instantly check whether your JSON is valid, right in your browser.
Paste your JSON below to instantly check whether it's valid - entirely in your browser, nothing is sent to our servers.
More API & Developer Testing Tools
View all 17JustChecker builds tools that respect your data - this one never leaves your browser.
What Is the JSON Validator?
It checks whether text is valid JSON and shows the parser's error message when it is not - most browsers include the line or character position. Validation runs in your browser.
When to Use It
- When an API rejects your request body.
- When a config file fails to load.
How to Use It
- Paste the JSON.
- Read the result, and the error message if it is invalid.
Understanding the Result
The most common errors are single quotes instead of double quotes, trailing commas, comments, unquoted keys and missing commas between items.
Limitations
This checks JSON syntax, not whether the data matches a particular schema. Loose JavaScript-style objects can be converted with Code to JSON.
Examples of Invalid JSON
| Invalid | Why | Valid |
|---|---|---|
{'name': 'Asha'} | Single quotes | {"name": "Asha"} |
{"a": 1, "b": 2,} | Trailing comma | {"a": 1, "b": 2} |
{name: "Asha"} | Unquoted key | {"name": "Asha"} |
{"a": 1 "b": 2} | Missing comma | {"a": 1, "b": 2} |
{"n": NaN} | NaN and undefined are not JSON | {"n": null} |
// comment | Comments are not allowed | Remove the comment |
Reading the Error Message
Errors such as "Unexpected token } in JSON at position 42" point to where the parser gave up, which is often just after the real mistake. Look at the character before the position - a stray comma or a missing quote is usually there.
When JSON Looks Right but Fails
- Smart quotes (“ ”) copied from a document or chat app instead of straight quotes (").
- A byte-order mark or invisible characters at the start of a file.
- Unescaped characters inside strings, such as a raw line break or a backslash in a Windows path (
C:\newmust beC:\\new).
Once it is valid, make it readable with the JSON Formatter. Read more in how to format and validate JSON.
Frequently Asked Questions
Explore More Tools
Keep going with related categories and our most used tools.