Technical
Warning

Double-escaped HTML entities in structured data

This error appears when a page's structured data (JSON-LD) contains HTML entities escaped twice, like & instead of &. Here's what it means and how to fix it.

What this error means

Structured data in JSON-LD format lives inside the HTML it's part of, so its text can pass through two different escaping systems: HTML's and JSON's. When they coexist correctly, there's no problem. The problem shows up when something on the HTML side — a caching plugin, a minifier, or the CMS itself — re-escapes a JSON-LD payload that was already correctly formed. The result is an HTML entity escaped twice: instead of & you get &, instead of a quote you get ", instead of a Unicode symbol you get something like ✔. For years this went unnoticed because Google unrolled the double escaping and processed the field anyway. Since Google stopped doing that, the text reaches it as-is: literal, undecoded, and the field that contains it stops being valid for rich results. It's a silent error. It doesn't break the page and isn't visible while browsing; it only shows up if you look at the JSON-LD exactly as Google receives it.

Why it matters to fix it

Having structured data fields with double-escaped entities won't take your site down, but it does cost you the benefits structured data was supposed to give you.

You lose eligibility for rich results

If the affected field is one Google needs to show a special search feature (stars, FAQ, events...), it arrives corrupted and Google may discard it.

The data doesn't say what you think it says

A name, description, or price can arrive with a literal & in the middle instead of the actual character.

It's easy for it to go unnoticed for months

It doesn't break anything visually, so it can build up across the whole site without anyone noticing, especially if it comes from a caching plugin enabled site-wide.

How to fix it step by step

Fixing this isn't about touching the JSON-LD you already wrote — it's about finding what's re-escaping it along the way.

Step 1

Find out what touches the HTML after it's generated

The usual suspects are caching plugins, HTML minifiers, and optimizers that compress the page's code.

Where to apply it: Your CMS or server's caching/minification settings.

Step 2

Exclude <script type="application/ld+json"> blocks from minification

Most of these plugins let you exclude specific tags from minification.

Where to apply it: Advanced options of the caching/minification plugin.

Step 3

Use standard JSON escapes, not HTML entities

If you generate the JSON-LD yourself, use \", \n, and & instead of HTML entities.

Where to apply it: The code or template that builds the JSON-LD.

Step 4

Validate the result

Check that the affected field no longer shows the double-escaped literal text.

Where to apply it: Google's Rich Results Test.

If you want to understand it even better

To help you better understand this type of error and why it happens, we include additional materials that expand the explanations, guide with examples, or show alternative methods.

Google's Rich Results Test

Check how Google interprets a URL's structured data, including fields affected by double escaping.

View resource

Does your site have this problem?

Audit your website for free and discover if this and other SEO errors are affecting your ranking.

Get a free audit. Over 2808 reports delivered.
Hey, wait a moment
To analyze a website, you first need to create an account in the application. Click the button below to go to the registration screen.
Create account