Expected ',' or '}' after property value in JSON at position 47
Updated by John Marshall
The SyntaxError is thrown at the first character after a property’s value when that character isn’t a comma or the closing }. A comma is missing, a double quote inside a string ended the string early, or the value is written in a way JSON can’t read. Inside an array, the message is Expected ',' or ']' after array element.
Quick fix
- If a new property starts at the position in the message, add a comma after the value before it.
- If the position is inside the text of a string, put a backslash before the double quote just before it:
\". - If the position equals the length of the text, the JSON was cut off. See Unexpected end of JSON input.
Fix your JSON
A missing comma
For the example in the box above, Chrome reports Expected ',' or '}' after property value in JSON at position 47 (line 4 column 3). Line 4 column 3 is the opening quote of "stuck_under". The parser skips spaces and line breaks after a value, so it stops on the line below the mistake. The comma belongs on line 3, after "stuck".
This is left behind when a property is added by hand at the end of an object: the line that used to be last had no comma.
Expected ',' or ']' after array element
With the comma added on line 3, the same example fails again with Expected ',' or ']' after array element in JSON at position 112 (line 5 column 33), because the two strings in no_go_zones have no comma between them.
A wrong closing bracket gives the array message too. {"no_go_zones": ["server room", "Leo's desk"} fails at the }, where the array should have ended with ].
A double quote inside a string
{"robot": "TIDY-002", "note": "stuck under the "good" chair again"}Chrome stops at position 48, the g of good. The quote before good closed the string, so the value the parser read is "stuck under the " and the next character had to be a comma or }.
This happens when a value is dropped into a template string. JSON.stringify writes the backslashes:
const note = 'stuck under the "good" chair again';
const broken = `{"robot": "TIDY-002", "note": "${note}"}`;
JSON.parse(broken);
// SyntaxError: Expected ',' or '}' after property value in JSON at position 48
const text = JSON.stringify({ robot: "TIDY-002", note });
// {"robot":"TIDY-002","note":"stuck under the \"good\" chair again"}Python words this mistake as Expecting ',' delimiter, and the guide to that message has the json.dumps version.
Numbers followed by other characters
A value that starts with a digit is read as a number for as long as the characters fit one. The error is at the first character that doesn’t:
| Written as | The parser stops at | Valid JSON |
|---|---|---|
"firmware": 2.0.0-rc.3 | The second dot | "firmware": "2.0.0-rc.3" |
"battery": 64% | The % sign | "battery": 64 |
"last_run": 2026-11-12T09:30:00Z | The first hyphen | "last_run": "2026-11-12T09:30:00Z" |
Version numbers and dates have to be strings. A semicolon between two properties gives the same message at the ;.
The same error elsewhere
| Chrome, Edge | Expected ',' or '}' after property value in JSON at position 47 (line 4 column 3) |
|---|---|
| Chrome, Edge (array) | Expected ',' or ']' after array element in JSON at position 112 (line 5 column 33) |
| Node.js 20 | Expected ',' or '}' after property value in JSON at position 47 |
| Firefox | JSON.parse: expected ',' or '}' after property value in object at line 4 column 3 of the JSON data |
| Safari | JSON Parse error: Expected '}' |
| Python | json.decoder.JSONDecodeError: Expecting ',' delimiter: line 4 column 3 (char 47) |
| Go | invalid character '"' after object key:value pair |
| jq | jq: parse error: Expected separator between values at line 4, column 15 |
| PHP, json_last_error_msg() | Syntax error |