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

Unescaped characters breaking JSON-LD

What it is

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. Bad characters invalidate structured data. Markup won’t parse; no rich results. Escape properly; validate.

Why does unescaped characters breaking json-ld matter for AI search?

Markup won’t parse; no rich results.

How do you fix it?

Escape properly; validate.

How do you 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.

Which ranking and citation factors does it touch?

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

What is the impact?

Medium-high for rich results. Direct.

What is the evidence?

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

Frequently asked questions about unescaped characters breaking json-ld

What does "Unescaped characters breaking JSON-LD" mean?

Bad characters invalidate structured data.

How do you fix unescaped characters breaking JSON-LD?

Escape properly; validate.