What is JSON-LD schema markup?
Our Multi Script Generator is for JSON Schema script markup which is structured data you add to your page's HTML - a small block of code that tells Google exactly what your content is: a product, a review, a business, a FAQ. It doesn't change what visitors see, but it dramatically changes how search engines and AI tools read and present your page.
Google uses it to generate rich results - star ratings, price snippets, FAQ dropdowns, and sitelinks that appear directly in search, before anyone clicks. For Shopify stores, this is one of the highest-leverage SEO improvements you can make.
The format is application/ld+json - a single JSON script tag that lives in your page's <head> or Liquid template.
Why use this generator?
Built specifically for Shopify and ecommerce - not a generic one-size-fits-all tool
One clean script, no bloat
Combine multiple schema types into a single @graph block. Reduces duplicate code, improves text-to-script ratio, and keeps page load fast.
Google rules enforced
FAQPage is always output standalone. Review and AggregateRating nest inside Product by default - exactly how Google expects them for rich result eligibility.
Platform-aware nesting
Already using a Shopify review app? Uncheck the nesting toggle and keep your schemas separate - no conflicts with Judge.me, Yotpo, or Okendo output.
Fill only what you have
Empty fields are never included in the output. No invalid "" values, no broken schema. Only the properties you actually enter make it into the script.
Built-in validation hints
Flags missing required fields - price, image, author - before you even open Google's Rich Results Test. Fewer round-trips, faster implementation.
Copy or download, paste & go
Each output block has its own copy button. Combined schema and standalone FAQ copy separately, ready to drop into your Shopify Liquid template or theme editor.
Google's key schema rules for Shopify stores
How to use this tool
Select your schema types
Use the left sidebar to choose which schemas apply to the page you're optimising. A product page typically needs Product, BreadcrumbList, and AggregateRating. A homepage needs WebSite and Organization.
Fill in the fields
Only fill what you have. Required fields are marked with a red asterisk. Leave anything blank that isn't relevant - blank fields are excluded from the output automatically.
Set nesting options for Review & AggregateRating
If your Shopify review app already outputs review schema, uncheck "Nest inside Product". Otherwise leave it checked - nested is correct and preferred by Google.
Click Build Schema
Your output appears below the tool. The main combined block and any standalone scripts (FAQPage) each have their own Copy button.
Paste into your Shopify template
Use a custom Liquid code block or the theme editor to add the script to the correct template. See the Shopify implementation guide below for exact steps - including where to place each script type for product pages, collection pages, and the homepage.
Validate with Google
Click the "Test in Google" button to open Rich Results Test with one click. Check for warnings - especially on Product schema where price and image are required for rich result eligibility.
Select a schema type from the left to begin.
Review & AggregateRating nest inside Product by default.
FAQPage always outputs as its own standalone script.
Adding JSON-LD Schema to Shopify - Implementation Guide
How to add structured data scripts to your Shopify theme templates using Liquid code blocks
1Which template file to edit
Each page type in Shopify has its own Liquid template. Add your schema to the template that matches the page you're optimising - not globally to every page.
product.liquid
- Product schema
- AggregateRating (nested)
- Review (nested)
- BreadcrumbList
📚 collection.liquid
- CollectionPage schema
- BreadcrumbList
- Organization
🏠 index.liquid
- WebSite schema
- Organization
- LocalBusiness
📄 article.liquid
- Article / BlogPosting
- Person (author)
- BreadcrumbList
👥 page.liquid
- FAQPage (standalone)
- Person
- LocalBusiness
🏭 theme.liquid
- WebSite (site-wide)
- Organization (site-wide)
- Avoid adding page-specific schema here
2Method A - Theme editor (no code, easiest)
Works in most modern Shopify themes. Best for adding static, hardcoded JSON-LD to a single page or template section.
Open Online Store → Themes
From your Shopify admin, go to Online Store → Themes and click Customize on your active theme.
Navigate to the correct page template
Use the page type dropdown at the top of the editor (it defaults to Homepage). Switch to Products, Collections, or whichever template you need.
Add a Custom Liquid block
In the left panel, click Add section (or Add block inside an existing section). Search for Custom Liquid and add it. Position it at the bottom of the template - it won't affect visible layout.
Paste your JSON-LD script
Copy the output from the Schema Generator and paste it directly into the Custom Liquid text box. The full <script type="application/ld+json">...</script> block goes in as-is.
Save and validate
Click Save, then open the live page and run it through Google's Rich Results Test.
3Method B - Code editor with Liquid variables (recommended for product pages)
This method makes your schema dynamic - product name, price, image, and availability pull directly from Shopify's data objects so the schema always stays in sync with your store.
Go to Edit Code
In your Shopify admin: Online Store → Themes → ... (Actions) → Edit code.
Find your template file
In the left file tree, open the Templates folder. Click the file you need - e.g. product.liquid or product.json (in newer themes). For JSON-based themes, you'll create a section snippet instead - see step 3b below.
Paste your schema at the bottom of the file
Scroll to the bottom of the template file. Paste your schema block after all existing content. For cleanliness, wrap it in a Liquid comment so it's easy to find later.
Dynamic product schema - copy & adapt
Replace the static values from the generator with these Liquid variable equivalents. Shopify fills them in automatically at render time.
{% comment %} JSON-LD Product Schema - generated via Schema Generator {% endcomment %} <script type="application/ld+json"> { "@context": "https://schema.org", "@graph": [ { "@type": "Product", "name": {{ product.title | json }}, "description": {{ product.description | strip_html | json }}, "image": {{ product.featured_image | img_url: 'master' | prepend: 'https:' | json }}, "url": {{ shop.url }}{{ product.url }}, "sku": {{ product.selected_or_first_available_variant.sku | json }}, "brand": { "@type": "Brand", "name": {{ product.vendor | json }} }, "offers": { "@type": "Offer", "price": {{ product.price | money_without_currency | remove: ',' }}, "priceCurrency": {{ cart.currency.iso_code | json }}, "availability": {% if product.available %}"https://schema.org/InStock"{% else %}"https://schema.org/OutOfStock"{% endif %}, "url": {{ shop.url }}{{ product.url }} }, "aggregateRating": { "@type": "AggregateRating", "ratingValue": "4.8", "reviewCount": "124" } }, { "@type": "BreadcrumbList", "itemListElement": [ { "@type": "ListItem", "position": 1, "name": "Home", "item": {{ shop.url | json }} }, { "@type": "ListItem", "position": 2, "name": {{ product.type | json }}, "item": "{{ shop.url }}/collections/{{ product.type | handleize }}" }, { "@type": "ListItem", "position": 3, "name": {{ product.title | json }}, "item": "{{ shop.url }}{{ product.url }}" } ] } ] } </script>
Organisation / WebSite schema for the homepage (static - goes in theme.liquid or index.liquid)
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "WebSite",
"name": {{ shop.name | json }},
"url": {{ shop.url | json }},
"potentialAction": {
"@type": "SearchAction",
"target": {
"@type": "EntryPoint",
"urlTemplate": "{{ shop.url }}/search?q={search_term_string}"
},
"query-input": "required name=search_term_string"
}
},
{
"@type": "Organization",
"name": {{ shop.name | json }},
"url": {{ shop.url | json }},
"logo": {{ shop.brand.logo | image_url: width: 600 | prepend: 'https:' | json }},
"email": {{ shop.email | json }},
"sameAs": [
"https://www.facebook.com/yourpage",
"https://www.instagram.com/yourhandle"
]
}
]
}
</script>
4Method C - Creating a standalone schema snippet
For online store 2.0 themes (Dawn, Refresh, etc.) with JSON-based templates, the cleanest approach is a dedicated Liquid snippet that you include wherever needed.
Create a new snippet file
In Edit Code, open the Snippets folder and click Add a new snippet. Name it something clear like schema-product or schema-faq.
Paste your schema into the snippet
Drop your full <script type="application/ld+json"> block (with Liquid variables if needed) into the new snippet file and save.
Include the snippet in your template
In product.liquid (or whatever template applies), add one line at the bottom to pull in the snippet:
{% comment %} Schema markup {% endcomment %} {% render 'schema-product' %} {% render 'schema-faq' %}
This keeps your template files clean and lets you update schema across the whole store by editing one snippet file - without touching individual templates.
5Where to place the script tag
Google can read JSON-LD anywhere in the page - <head> or <body>. However, for Shopify specifically:
- Product / Article / Collection schema - place at the bottom of the template body. Easier to maintain and won't delay head rendering.
- WebSite / Organization - can go in <head> via theme.liquid since they're site-wide and static.
- FAQPage - place near the FAQ content on the page, or at the bottom of the template. Keep it as a separate <script> block - never merge into your main @graph.
- Never place schema inside a conditional that hides it - e.g. inside {% if template == 'product' %} blocks that may not render. Google needs to be able to read it reliably on every page load.
6Testing & validation
Google Rich Results Test
Paste your live page URL (after saving and publishing) into search.google.com/test/rich-results. It shows exactly which rich result types are detected and flags any errors or warnings.
Schema.org validator
validator.schema.org gives a broader structural check. Useful for catching type errors and missing required properties that Google's tool might not flag clearly.
Google Search Console - Rich Results report
After a few days of Google crawling, check Search Console under Search appearance → Rich results. This shows real-world eligibility across your whole store - not just a single URL.