JSON Property Names Must Be Double-Quoted: What It Means and How to Fix It
Unlike JavaScript object literals, JSON requires every object key to be a double-quoted string. Bare identifiers such as name, userId, or enabled are invalid JSON.
What this JSON error means
SyntaxError: Expected property name or } in JSONInside every JSON object, the token after { or , must be either a double-quoted property name or the closing }. Quote every bare property key.
Broken JSON vs. corrected JSON
Compare the invalid syntax with a corrected version before applying the same change to your payload.
Invalid JSON
{name:"Ada", active:true}Valid JSON
{"name":"Ada", "active":true}Common causes of this JSON error
- ●Copying a JavaScript object literal
- ●Writing configuration by hand
- ●Assuming simple identifier keys do not need quotes
- ●Converting from YAML without a real serializer
Fix and validate your JSON
After correcting the suspected syntax, run the complete payload through a validator. If it still fails, use the diagnostic tool to locate the next parser error before formatting the final JSON.
Related JSON errors
JSON Unexpected Token Error
Understand and fix JSON unexpected token errors. See broken and corrected examples, common causes, and a fast workflow for finding the exact invalid character.
Unexpected End of JSON Input
Fix “Unexpected end of JSON input” errors caused by truncated JSON, missing braces or brackets, incomplete strings, and empty API responses.
Trailing Comma in JSON
Learn why trailing commas are invalid in standard JSON and fix objects or arrays copied from JavaScript, TypeScript, JSON5, or configuration files.
Single Quotes in JSON
Fix invalid JSON that uses single quotes. JSON requires double quotes around property names and string values.
Invalid Escape Character in JSON
Fix invalid JSON escape sequences in Windows paths, regex strings, copied text, and backslash-heavy values.
Comments Are Not Allowed in JSON
Learn why // and /* */ comments make strict JSON invalid, and when to use JSONC, JSON5, or separate metadata instead.
JSON error FAQ
What does JSON Property Names Must Be Double-Quoted mean?
Unlike JavaScript object literals, JSON requires every object key to be a double-quoted string. Bare identifiers such as name, userId, or enabled are invalid JSON.
How do I fix JSON Property Names Must Be Double-Quoted?
Inside every JSON object, the token after { or , must be either a double-quoted property name or the closing }. Quote every bare property key.