How to Fix Malformed JSON-LD Schema Markup
errorThe Problem
Your page has JSON-LD schema markup, but it contains syntax errors — missing commas, unescaped quotes, unclosed brackets, or invalid data types. Malformed JSON-LD is completely ignored by Google.
trending_upWhy It Matters for SEO
Schema markup with syntax errors is worse than no schema at all — because you think you have it while Google sees nothing. This means no rich results, no star ratings, and no price display in search listings, despite having the code on your page.
buildHow to Fix It
- 1
Test your pages at Google's Rich Results Test.
- 2
Check for common JSON errors: missing commas, unescaped quotes in product descriptions, trailing commas.
- 3
Open your theme's JSON-LD template.
- 4
Use the json filter in Liquid to properly escape values: {{ product.description | json }}
- 5
Re-test after fixing.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": {{ product.title | json }},
"description": {{ product.description | strip_html | truncate: 500 | json }},
"image": {{ product.featured_image | image_url: width: 1024 | json }},
"offers": {
"@type": "Offer",
"price": {{ product.selected_or_first_available_variant.price | money_without_currency | json }},
"priceCurrency": {{ cart.currency.iso_code | json }},
"availability": "https://schema.org/{% if product.available %}InStock{% else %}OutOfStock{% endif %}"
}
}
</script>Related Fix Guides
How to Fix Broken Schema Markup on Shopify & WooCommerce
Your JSON-LD schema is missing or broken, blocking Google rich results. Here's how to fix Product schema on Shopify and WooCommerce with working code.
How to Fix Product Schema Missing Price on Shopify & WooCommerce
Your Product schema is missing price data, blocking Google Shopping rich results. Here's how to add offers.price to your Shopify or WooCommerce store.
Want to check if YOUR store has this issue?
Scan your site for free — get copy-paste fixes in 60 seconds.
searchScan Now — It's Free