Here is what the bug looks like:
{
"name": "Ada"
"role": "engineer"
}
The gap between "Ada" and "role" is the entire bug. One comma after "Ada" and the file parses. I ran into this exact version last month adding a single line to a config file I had not touched in a year. I typed the new pair, forgot the comma on the line I used to think of as last, and the file broke silently until something parsed it. That is the most common trigger: adding a line to an object that already existed.
Why the missing comma error blames the wrong line
Parsers report the spot where they gave up, not the spot where you made the mistake. When the parser finishes reading the value "Ada", it starts the next token and finds a string where it expected a comma or a closing brace. It reports that position. So the reported line is the second line of the pair, and the fix is always on the line before it. Once you internalize that, the message reads less like an accusation and more like directions: look one line up.
The same bug wears different masks depending on the language. Python says json.decoder.JSONDecodeError: Expecting ',' delimiter: line 3 column 3 (char 42). Older Node versions said Unexpected token } in JSON, which sends you hunting for an extra brace that does not exist. Modern Chrome and Node say Expected ',' or '}' after property value in JSON at position N, which at least names the comma. If you paste a file between languages and the messages change, it is still the same missing comma.
The merge variant
The other place I see this constantly is version control. Two people edit the same object, one adds a line at the bottom, the other adds a line above it, and the merge lands without a comma between the two additions. It parses nowhere and nobody's diff looks wrong, because each person's change was fine on its own. When a config breaks right after a merge, I now check the seams between added lines before I check anything else. The comma lives at the seam.
Missing commas in minified JSON
In pretty-printed JSON the previous line is obvious. In minified JSON the "check the line above" advice collapses, because everything sits on one line. The fix that actually works is to format the file first, then read the error again. Most editors reformat on paste or on save. Run the formatter and the reported position suddenly maps to a line you can see. I would not hunt a missing comma inside a single-line 40,000 character file by eye. Format first, fix second.
Can you fix it automatically?
Mostly, yes. When a parser reports that it expected a comma at an exact position, a repair tool can insert one there with high confidence. There is one case I would not auto-fix blindly: when the file also has unquoted keys or stray quotes, a missing comma error can really be a missing quote. Inserting a comma then "fixes" the parse while quietly changing the data. So the right behavior for a repair tool is to show you what it changed and why, so you can catch that substitution. That is what the tool below does. Paste the broken JSON and it inserts the comma and highlights the line it touched.
Paste your broken JSON into the repair tool and it will insert the missing comma and show you exactly what it changed.
Frequently asked questions
What does "Expected ',' or '}' after property value" mean?
The parser finished reading a value and found the next key with no comma between them. Add a comma at the end of the line above the reported position.
Why does a JSON parse error point at the wrong line?
Parsers report where they gave up, not where you made the mistake. With a missing comma, the reported position is the start of the second line of the pair, so the fix is always on the line before it. Read backwards from the reported position.
What is Python's error message for a missing comma in JSON?
Python reports json.decoder.JSONDecodeError: Expecting ',' delimiter: line X column Y (char N). Modern Node and Chrome say Expected ',' or '}' after property value in JSON at position N. Different wording, same missing comma.
Can a repair tool add a missing comma automatically?
Usually yes, when the parser expected exactly a comma at an exact position. The exception is a file that also has unquoted keys or stray quotes, where a missing quote can produce the same error. Use a tool that shows you what it changed so you can verify the comma was the real problem.
Get one practical dev-tools guide a week: subscribe to the newsletter for new JSON guides and parser explainers.
Related reading: Why Is My JSON Invalid? The 7 Syntax Errors That Break JSON.parse · The Trailing Comma That Breaks Your JSON (And the 30-Second Fix) · Fixing Unescaped Quotes in JSON String Values · How to Fix the JSON Single Quotes Error