Free tool by GoodAI
JSON Validator: Find and Fix Syntax Errors
Paste JSON to check it instantly. If it is invalid, the validator shows the line, column and reason of the first error, and one click moves the cursor there.
What makes JSON valid
Valid JSON follows a strict grammar. Objects use double-quoted keys, strings use double quotes, values are strings, numbers, true, false, null, arrays or objects, and items are separated by commas with no comma after the last one. Comments, single quotes, undefined and NaN are not part of JSON, even though JavaScript accepts some of them.
Common JSON errors and how to fix them
- Trailing comma: remove the comma after the last item in an object or array.
- Single quotes: replace 'text' with "text". JSON only allows double quotes.
- Unquoted keys: write {"name": 1} instead of {name: 1}.
- Comments: remove // and /* */ comments before validating.
- Unescaped characters: a line break or tab inside a string must be written as \n or \t.
- Missing comma or bracket: the reported position is usually right after the place where something is missing.
How to read the error message
The message names the unexpected character and what was expected instead, for example Unexpected "o", expected a value. The reported position is where the parser gave up, so look at the character just before it as well. Press the red status line to place the cursor at that position in the input.

