Expected Property Name in JSON – Causes and Fixes

Local only

An object parser expects a double-quoted property name after an opening brace or comma. JavaScript-style keys, stray punctuation, or an incomplete property can trigger this message.

Indent

36 chars · 4 lines

Two-way sync · Edit either side and the other updates automatically.

Invalid JSONExpected double-quoted property name
Line 3Column 3Character 22Found “r”
role: "admin"

JSON object parser error

What Expected property name means in JSON

Inside a JSON object, every property name must be a double-quoted string. If the parser reaches an identifier, closing token in the wrong place, or other punctuation where a key should begin, it reports an expected-property-name error. This tool is free to use. No account or payment is required.

Last updated

What you can do here

  • Browser-local JSON processing
  • Route-specific malformed JSON example
  • Focused parser or repair guidance
  • Broken and corrected JSON example
  • Related JSON problem navigation

Steps

  1. Go to the reported object position and identify the next property name.
  2. Wrap identifier-like property names in double quotes and remove stray separators.
  3. Validate again to reveal any later object syntax errors.

JSON object keys are always quoted strings

JavaScript object literals can use identifier-like keys without quotes, but JSON cannot. A copied configuration object may therefore look familiar while failing strict JSON parsing.

  • Unquoted property names such as role or userId.
  • A trailing comma followed by a closing brace.
  • An incomplete member after a comma.

Check the separator before the reported key

Parsers often report the token where they finally know the object grammar is impossible. The actual mistake may be the comma, quote, or colon immediately before that location.

Expected property name example

The role key is valid JavaScript-style syntax but must be quoted in JSON.

Invalid JSON object

{
  "name": "Ada",
  role: "admin"
}

Valid JSON object

{
  "name": "Ada",
  "role": "admin"
}

Common questions

Frequently asked questions

Can JSON property names be unquoted?

No. Standard JSON requires object property names to be double-quoted strings.

Why does JavaScript accept the same object?

JavaScript object literal syntax is broader than JSON and permits many identifier-like keys without quotation marks.

Can a trailing comma cause an expected property name error?

Yes. After a comma the parser expects another property name, so a closing brace can be reported as unexpected depending on the runtime.

Debugging a specific JSON issue? Browse JSON troubleshooting.