What the error means
Expected double-quoted property name in JSON at position N is the wording Chromium-based engines use for the same failure other engines describe as expected property name. The parser is inside an object, has just consumed a { or a ,, and needs a key. A JSON key is always a string in double quotes; whatever it found at position N is not.
The position is a character offset from the start of the document, counting from zero. In the example above it points at port, the first unquoted key, even though the trailing comma at the end is a second, independent mistake that will surface as soon as the first is fixed.
Why it happens
- Keys copied from JavaScript or TypeScript source. Object literals in code do not need quotes, so
port: 5432looks fine in an editor and is invalid the moment it is treated as JSON. - A trailing comma. After the last
,the parser expects one more key and finds}. Chromium reports that as this same message, because from its point of view a property name was expected and a brace arrived. - Single quotes.
'port': 5432fails on the first quote character. - A configuration file that is really JSON5 or JSONC. Tools like VS Code, TypeScript, and many bundlers accept comments and unquoted keys in their config files. Strict JSON parsers, including this converter, do not.
How to fix it
- Paste the document into the converter above and click Convert. The error card translates the position into a line and column.
- Quote the key at that spot. Then look at the end of every object for a comma immediately before
}and remove it. - Convert again. When it succeeds, the YAML output is a useful second check: every key appears on its own line, so a key that was accidentally merged with a value stands out.
Corrected, the example converts to:
host: db.internal
port: 5432
ssl: true
If the document has many unquoted keys, JSON Repair will quote all of them and strip the trailing commas in a single pass; paste its output back here to convert.
If it still fails
- Verify that you are converting in the right direction. If the input is already YAML, use YAML to JSON instead; YAML keys are unquoted by design and this error means you have them the wrong way round.
- Watch for a value on the same line as a key with the colon missing (
"port" 5432). The parser will report the next key rather than the missing colon. - Nothing pasted into the converter leaves your browser, so a configuration file containing hostnames or credentials can be checked here safely.
Related errors
Expected property name or '}' in JSON
Every key must be a double-quoted string. Quote unquoted keys, replace single quotes with double quotes, and remove trailing commas and comments.
Unexpected token } in JSON
Delete the comma after the last property or array item. JSON allows no trailing commas, so the parser reaches } while still expecting another value.