</>
ValidateHTML

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

Invalid JSON
{
  "name": "John"
  "age": 30
  "city": "Paris"
}
Valid JSON
{
  "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 Validator
Recommended

Cloudways · Managed Cloud Hosting

Fix this JSON error, then deploy on Cloudways managed cloud (AWS, GCP, DigitalOcean). 20% off 3 months with code VALIDATEHTML.

Start free trial

Related JSON Errors

View all JSON errors