support@schemaclinic.com Free JSON-LD checker Free schema generator Shopify App Store
Schema guide

Is JSON-LD or microdata better for Shopify?

Both formats can describe the same product to Google. On a Shopify store, though, one of them is far easier to live with. Here is the decision, and what to do if your theme already uses the other one.

Short answer: JSON-LD is better for Shopify. Google supports both formats equally for rich results, but recommends JSON-LD, and on Shopify it is easier to maintain: it sits in one block that reads values from Liquid, it survives layout changes, and it is the only format an app can add through an app embed. If your theme still uses microdata, either keep it and add nothing that duplicates it, or replace it with JSON-LD. Never run both for the same product.

What Google says

Google's introduction to structured data lists JSON-LD, Microdata and RDFa as supported formats and recommends JSON-LD. A complete, valid Product described in microdata is just as eligible for product rich results as the same Product in JSON-LD. So this is not a choice between a format that works and one that does not. It is a choice about which one is easier to get right and keep right on your store.

For a side-by-side of the formats themselves, with code for each, see what is JSON-LD? This page is about the Shopify decision.

Why JSON-LD suits a Shopify store

On ShopifyJSON-LDMicrodata
Where the code livesOne block, usually in the product section or an app embedSpread across the HTML of the product template
Theme customisationMoving sections and blocks does not affect itRemoving or reordering a block can remove a property
Added by an appYes, through an app embed, no theme editsNo, it has to be woven into theme HTML
Linking blocks with @idEasyPossible but awkward
Shopify's structured_data filterOutputs JSON-LDNot applicable

The deciding point on Shopify is that themes change. Merchants move sections in the theme editor, apps add blocks, and theme updates replace files. Microdata depends on the exact HTML of the template, so every change risks dropping a property. A JSON-LD block reads values straight from Liquid objects, so the layout can change around it:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": {{ product.title | json }},
  "url": {{ request.origin | append: product.url | json }}
}
</script>

Many current themes, including Dawn, output Product as JSON-LD using Shopify's structured_data filter.

If your theme still uses microdata

Some older themes, and some app widgets, still output microdata. To check, view the source of a product page and search for itemscope and itemprop as well as application/ld+json. You then have two sensible options:

  • Keep the microdata if it is complete and valid in the Rich Results Test, and make sure nothing else adds a second Product. This is fine; Google reads it.
  • Replace it with JSON-LD. On a duplicate of your theme, remove the itemscope, itemtype and itemprop attributes for the Product and its Offer, then add a single JSON-LD block from the theme or an app. Test the duplicate before publishing it.

The mistake to avoid: installing a schema app that adds JSON-LD while the theme's microdata stays in place. Google reads both formats, so the page now has two Product items, often with different prices or availability. It looks like one set of markup in the code but counts as two. See duplicate Product schema.

Server-rendered JSON-LD beats JavaScript-injected JSON-LD

One more distinction matters more on Shopify than the format question. JSON-LD can be in the page HTML (written by the theme's Liquid or an app embed) or injected by a script after the page loads. Google can read JSON-LD that is added with JavaScript, but only after it renders the page, which can happen later than the first crawl and is less predictable. JSON-LD in the HTML is read straight away, and you can see it with View Source.

Schema Clinic's audit checks both: it reads the rendered pages and, with Deep Scan, catches JSON-LD that apps inject with JavaScript, and it flags microdata and JSON-LD that duplicate each other. On Pro ($19.99/month) its generated JSON-LD is output with the page through the "Schema Clinic" app embed, with no theme code edited. Starter is $9.99/month; there is no free plan or trial.

Questions people ask

Does Google rank JSON-LD higher than microdata?
No. The format does not affect ranking, and structured data is not a ranking factor. Google recommends JSON-LD because it is easier to implement and maintain, not because it scores better.
Is Shopify markup JSON-LD or microdata?
Most current Shopify themes output JSON-LD, often through the structured_data filter. Some older themes and app widgets still use microdata. View the page source and search for ld+json and itemprop to see which yours uses.
Can I use JSON-LD and microdata on the same page?
Yes, for different things, but never for the same thing. A Product in microdata plus a Product in JSON-LD is a duplicate, even though the code looks different.
Should I convert my theme's microdata to JSON-LD?
Only if it is incomplete, broken or you want an app to manage your schema. Complete, valid microdata works. If you do convert, remove the microdata at the same time so you do not create a duplicate.
What about RDFa?
Google supports RDFa too, but it is rare on Shopify. The same advice applies: one format per thing, and JSON-LD is the easiest to maintain.

See what Google sees on your store

Run an audit in minutes. Every schema block, every error and duplicate, with its source.

Install Schema Clinic