Missing Comma Between Properties
JSON requires a comma between every key-value pair in an object and between every element in an array. A missing comma usually results in an 'expected comma or closing bracket' error. This often happens when adding new properties without remembering to add the separator.
Why It Matters
The JSON parser stops at the exact position where the comma is missing. Everything after that point is unparseable, even if the rest of the JSON is valid.
Code Examples
{
"name": "John"
"age": 30
"city": "Paris"
}{
"name": "John",
"age": 30,
"city": "Paris"
}How to Fix
- 1Add a comma after every key-value pair except the last one in an object.
- 2Add a comma after every element except the last one in an array.
- 3Read the error message carefully. The line number usually points to where the comma is missing.
- 4Use a JSON formatter to auto-fix comma placement.
Check Your JSON Now
Our JSON validator detects this error automatically and shows the exact line and column.
Open JSON ValidatorHostinger — Fast & Affordable Web Hosting
Deploy clean, validated JSON APIs on reliable hosting.
Related JSON Errors
Trailing Comma in JSON
How to fix the trailing comma error in JSON. Unlike JavaScript, JSON does not allow a comma after the last element.
Unexpected Token in JSON
Learn why JSON throws an unexpected token error and how to fix it. Common causes include trailing commas, single quotes, and unquoted keys.
Unclosed Bracket or Brace in JSON
How to fix unclosed brackets and braces in JSON. Every opening { or [ must have a matching closing } or ].