Short answer: JSON-LD (JavaScript Object Notation for Linked Data) is a way of writing schema markup as a single script block in the page, separate from the visible HTML. Microdata and RDFa do the same job by adding attributes to the visible HTML tags. Google supports all three but recommends JSON-LD, because it is easier to add, read and maintain. For a Shopify store, JSON-LD is the right choice.
What JSON-LD is
Schema markup is a way to describe a page in a fixed vocabulary from schema.org. JSON-LD is one of the formats for writing it down. It is plain JSON (a format for data with keys and values) inside a script tag that browsers do not display:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Example Ltd",
"url": "https://example.com/",
"logo": "https://example.com/logo.png"
}
</script>
Shoppers never see it. Search engines and other tools read it to understand that this page belongs to a business called Example Ltd, with that website and that logo.
How to read a JSON-LD block
@context: the vocabulary in use, almost alwayshttps://schema.org.@type: what the thing is, such as Product, Organization or BreadcrumbList.- Properties such as
name,priceorlogo: facts about the thing. - Nested objects: a property can hold another typed object, such as an Offer inside a Product.
@id: a unique identifier, usually a URL with a#fragment, that other blocks can point to.@graph: a list of several entities in one block.
The "LD" stands for linked data, and @id is what makes it linked. A Product can say its brand is {"@id": "https://example.com/#organization"} rather than repeating the whole Organization.
JSON-LD vs Microdata vs RDFa
Microdata and RDFa put the same information into attributes on your visible HTML. The same product price in Microdata looks like this:
<div itemscope itemtype="https://schema.org/Product">
<h1 itemprop="name">Blue Linen Shirt</h1>
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer">
<span itemprop="price" content="45.00">£45</span>
<meta itemprop="priceCurrency" content="GBP">
</div>
</div>
| JSON-LD | Microdata | RDFa | |
|---|---|---|---|
| Where it lives | One script block | Attributes on HTML tags | Attributes on HTML tags |
| Recommended by Google | Yes | Supported | Supported |
| Easy to add from an app | Yes | No, needs theme edits | No, needs theme edits |
| Breaks when the layout changes | Rarely | Often | Often |
| Easy to link entities | Yes, with @id | Harder | Possible |
Google's introduction to structured data lists all three as supported formats and recommends JSON-LD.
Why JSON-LD suits Shopify
Shopify themes change: sections get moved, blocks get added, and themes get swapped. Microdata woven through the product template breaks every time that happens. A JSON-LD block sits in one place and pulls its values from Liquid objects, so the layout can change freely around it.
It is also how apps work. An app can add a JSON-LD block through an app embed without touching your templates, which it cannot do with Microdata.
Watch for mixed formats. Some older themes still output Microdata in their product templates. If an app then adds JSON-LD, the page has two Product descriptions in two formats. Google reads both, so it is a duplicate even though the code looks different. See duplicate Product schema.
How to see the JSON-LD on your store
- Open a product page, right-click and choose View page source.
- Search for
application/ld+json. Each match is one block. - Search for
itemscopetoo, to find any Microdata. - Run the URL through Google's Rich Results Test to see blocks that apps add with JavaScript, which view-source misses.
To check a block you have written yourself, paste it into our free JSON-LD checker or the Schema Markup Validator.
Where JSON-LD lives in a Shopify theme
In a Shopify theme, JSON-LD is written in Liquid files, so values can be filled in from your store data. You will usually find it in:
layout/theme.liquid: blocks that appear on every page, such as Organization.- Header section: Dawn puts Organization and WebSite here.
- Main product section: Product markup, often using
{{ product | structured_data }}. - Main article section: Article markup for blog posts.
- Snippets such as
snippets/schema.liquid, added by a developer or an older app.
Apps that use a theme app embed add their JSON-LD without appearing in these files at all, which is why searching the theme code does not always find everything. Viewing the rendered page is the reliable way to see what is output.
JSON-LD beyond Google
JSON-LD is read by more than Google. Bing and other search engines use it, and so can other tools that read web pages, including AI assistants that browse or index sites. Clear, consistent facts in your markup give all of them the same answer about your products and business. That does not guarantee a mention in any AI answer, and how each assistant uses structured data is not fully documented. Our guides on whether schema helps AI search and how AI assistants read Shopify stores cover what is known.
Common JSON-LD mistakes
- Trailing commas or missing commas. JSON is strict; one stray character breaks the whole block.
- Unescaped quotes in product titles or descriptions. In Liquid, always use the
| jsonfilter. - Prices with currency symbols, such as
"£45". Use"45.00"and put the currency inpriceCurrency. - Markup that does not match the page, such as a sale price in the schema but not on screen. Google's guidelines require markup to reflect visible content.
Broken syntax shows in Search Console as unparsable structured data.
How Schema Clinic handles JSON-LD
Schema Clinic's audit reads the JSON-LD on your live pages, including blocks added by JavaScript through its Deep Scan, and validates them against Google's documentation. On the Pro plan its generator outputs connected JSON-LD linked by @id for the core Shopify types. See features.