Skip to content
AI Search Score Independent AI-readiness audits for WordPress.

How to fix JSON-LD that won’t parse

Last updated:

AI Search Score checks that every JSON-LD block on your page is valid, parseable JSON. If even one block has a syntax error, engines may discard it — and you lose the structured data you worked to add.

Why this matters

Structured data only helps if machines can read it. A single stray character — a trailing comma, a curly “smart” quote, an unescaped quote inside a string — makes the whole block invalid, and an AI engine skips it silently. You don’t get a warning; you just don’t get the benefit.

How to fix it

Common causes and fixes:

  • Smart quotes: If you pasted JSON from a word processor, curly quotes (“” ‘’) replace straight ones and break it. Retype quotes as straight " in a plain-text/code context.
  • Trailing commas: JSON doesn’t allow a comma after the last item in an object or array. Remove it.
  • wpautop mangling: If you pasted JSON-LD into a regular paragraph block, WordPress wraps it in <p> tags and can corrupt it. Always use a Custom HTML block or a code-snippets plugin (WPCode) for JSON-LD — never a paragraph.
  • Unescaped quotes: A " inside a text value must be escaped as \" or the string ends early.

Paste the block into any JSON validator to pinpoint the exact line.

How to check it worked

Re-scan. “All JSON-LD parses as valid” should turn green. If it’s still failing, view source, copy each JSON-LD block in turn into a validator until you find the broken one.

Prefer this done for you? See our services.