About the JSON Validator
Check whether your JSON is valid. If it isn't, the validator shows the error message along with the line and column, so you can fix it fast.
Key features
- Strict RFC 8259 / ECMA-404 JSON validation
- Error message with exact line and column
- One-click 'Try to fix' for common mistakes
- Shows the root type of valid JSON
- Format valid JSON with one click
- Runs locally; safe for tokens and private data
What does a JSON validator do?
A JSON validator checks that text is well-formed JSON: every string is double-quoted, brackets and braces are balanced, commas sit between items (never after the last one), and only valid values are used. If anything is wrong, it tells you what and where.
Invalid JSON is one of the most common causes of failed API calls, broken builds and crashed config loaders, and the error messages from those systems are rarely helpful. Validating first saves a lot of guesswork.
Valid vs. invalid examples
| Input | Valid? | Why |
|---|---|---|
{"name": "Ada"} | ✅ | Correct object |
{'name': 'Ada'} | ❌ | Single quotes are not allowed |
{name: "Ada"} | ❌ | Keys must be quoted strings |
{"a": 1,} | ❌ | Trailing comma |
[1, 2, 3] | ✅ | Arrays are valid documents |
{"n": NaN} | ❌ | NaN isn't a JSON value |
"hello" | ✅ | A single string is a valid document |
{"a": 1} {"b": 2} | ❌ | Two documents; use JSON Lines instead |
Reading error messages
When validation fails you'll see a message like:
Expected ',' or '}' after property value in JSON at position 27 (line 3, column 5)
Go to line 3, column 5. The real mistake is usually just before that point, typically a missing comma at the end of the previous line or an unclosed string.
Common causes of invalid JSON
- Copying from JavaScript code. JS object literals allow unquoted keys, single quotes and trailing commas; JSON doesn't.
- Hand-editing config files. A missing comma after adding a new line is the classic mistake.
- String concatenation. Building JSON by gluing strings together often breaks escaping. Use a serializer such as
JSON.stringify. - Smart quotes. Word processors and chat apps replace
"with“ ”, which aren't valid. - Truncated output. Logs or terminals that cut long lines produce unbalanced brackets.
Fixing it automatically
Click Try to fix: the validator runs a repair step that adds missing quotes, removes trailing commas and comments, converts single quotes and closes unbalanced brackets. Always review the result, because the repairer has to guess what you meant. For more control, use the dedicated JSON Fixer.
Related tools
Once your JSON is valid, format it, explore it as a tree, or compare it with another version. For TOML files, use the TOML Validator.
How to use the JSON Validator
- Paste your data into the input box, upload a file, or click Sample to try it out.
- Adjust the options above the editor if you need to (indentation, delimiter, and so on).
- The result appears instantly in the output panel. Any errors are shown with their line and column.
- Click Copy to copy the result, or Download to save it as a file.