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

What is JSON-LD? A plain-English guide for Shopify owners

JSON-LD is the format most Shopify themes and apps use for schema markup. Here is what it is, how it compares with the older Microdata and RDFa formats, and how to read it on your own store.

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 always https://schema.org.
  • @type: what the thing is, such as Product, Organization or BreadcrumbList.
  • Properties such as name, price or logo: 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-LDMicrodataRDFa
Where it livesOne script blockAttributes on HTML tagsAttributes on HTML tags
Recommended by GoogleYesSupportedSupported
Easy to add from an appYesNo, needs theme editsNo, needs theme edits
Breaks when the layout changesRarelyOftenOften
Easy to link entitiesYes, with @idHarderPossible

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

  1. Open a product page, right-click and choose View page source.
  2. Search for application/ld+json. Each match is one block.
  3. Search for itemscope too, to find any Microdata.
  4. 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 | json filter.
  • Prices with currency symbols, such as "£45". Use "45.00" and put the currency in priceCurrency.
  • 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.

Questions people ask

What does JSON-LD stand for?
JavaScript Object Notation for Linked Data. It is JSON with a few extra keywords, such as @context, @type and @id, that let it describe things and link them together.
Is JSON-LD JavaScript?
No. It sits inside a script tag but it is data, not code. Browsers do not run it, and it does not slow the page down in the way scripts can.
Does Google prefer JSON-LD over Microdata?
Google supports JSON-LD, Microdata and RDFa, and recommends JSON-LD because it is easiest to implement and maintain at scale.
Can I have JSON-LD and Microdata on the same page?
You can, but avoid describing the same thing in both. A Product in Microdata and another in JSON-LD counts as two Product items.
Where should JSON-LD go in a Shopify theme?
Anywhere in the page, head or body. Most themes put Product JSON-LD at the end of the main product section and Organization in the header or theme.liquid.
Is Shopify markup JSON-LD or Microdata?
Most current Shopify themes output JSON-LD, including Dawn, which uses the structured_data filter. Some older themes still use Microdata in the product template. View the page source and search for ld+json or itemprop to see which yours uses.

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