JSON Validator
Check JSON for syntax errors, live as you type, with the parser's exact error message.
Expected double-quoted property name in JSON at position 40 (line 4 column 1)
Validates live as you type using your browser's own JSON parser, showing its exact error message (including the character position) when something's wrong. Runs entirely in your browser; nothing you type is sent anywhere.
Need the opposite? JSON Prettifier Tool
What is JSON Validator?
Paste JSON and see instantly whether it's valid, using your browser's own JSON parser. If it's not, you get the parser's exact error message (including where in the text it went wrong), not a generic "invalid JSON."
How to Use the JSON Validator
- 1
Paste the JSON: Enter the JSON you want checked.
- 2
Read the Result Instantly: Validity, or the parser's exact error and position, appears automatically as you type.
- 3
Fix and Recheck: Adjust the flagged spot and watch the check update live.
How It Works
Your input is run through JSON.parse(), the same parser your browser and Node.js use internally. If it succeeds, the JSON is valid, full stop. If it throws, the parser's own SyntaxError message and position are shown, since that's a more precise answer than any custom validator is likely to give.
Example
{"name": "Alice", "age": 30,}- Expected double-quoted property name in JSON at position 28 (line 1 column 29)
The trailing comma after `30` isn't valid JSON — the parser's own error message below points at exactly where it gave up.
What Kind of Errors It Surfaces
Trailing commas, missing or single-quoted keys (JSON requires double quotes around keys and string values), unclosed brackets or braces, and unescaped control characters inside strings. These are the common mistakes that happen when JSON is hand-edited or copied out of something that isn't strict JSON, like a JavaScript object literal.
Frequently Asked Questions
Common questions about JSON Validator.