HTML / XML / JS, low-level validity (cross-cutting)HighVerified

Unescaped characters breaking JSON-LD

An unescaped quote, ampersand or control character inside a JSON-LD value can break the whole block so Google ignores it. Generating the JSON programmatically avoids this.

What it is

Bad characters invalidate structured data.

Why it matters

Markup won’t parse; no rich results.

How to fix it

Escape properly; validate.

How to find it on your site

  1. Validate the structured data for parse errors.
  2. Find values containing unescaped characters.
  3. Escape them or build the JSON via a serialiser rather than by hand.
  4. Re-validate.

Cross-reference to ranking and citation factors

Unescaped characters void the structured-data block and its benefits. Correct escaping keeps it parseable.

Impact

Medium-high for rich results. Direct.

Evidence

Valid JSON-LD is required. Google Search Central, Structured data general guidelines