Free tool · No signup
Product Schema Generator
Product markup describes one product on its own page: what it is, what it costs, whether it's in stock and what buyers rate it. Online stores use it to qualify for price, availability and review stars in search.
JSON-LD
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Example Trail Running Shoe",
"image": [
"https://www.example.com/images/trail-shoe.jpg"
],
"description": "A lightweight trail running shoe with a grippy sole and a waterproof upper.",
"brand": {
"@type": "Brand",
"name": "Example Outdoors"
},
"sku": "EX-TRAIL-42",
"offers": {
"@type": "Offer",
"url": "https://www.example.com/products/trail-shoe",
"price": "89.00",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock",
"itemCondition": "https://schema.org/NewCondition"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": 4.6,
"reviewCount": 128
}
}
</script>Valid Product markup
In the Rich Results Test, choose Code and paste. Your data stays in this browser: nothing is sent to a server.
example.com › products › trail-shoe
Example Trail Running Shoe
A lightweight trail running shoe with a grippy sole and a waterproof upper.
Rating: 4.6 · 128 reviews · USD 89.00 · In Stock
Product snippets can show price, availability and review stars. Merchant listings (Shopping results) also want images, shipping and return details. Google decides whether to show them. Google's gallery
What Google can show
Product snippets can show price, availability and review stars. Merchant listings (Shopping results) also want images, shipping and return details. Google decides whether to show them.
Required and recommended properties
Google needs these for Product markup to be valid:
| Required | Notes |
|---|---|
| Product name |
| Recommended | Notes |
|---|---|
| Images | Required for merchant listings. Use high-resolution images in 16×9, 4×3 and 1×1 ratios if you have them. |
| Description | |
| Brand |
A complete example
The example values in the generator above produce this:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Example Trail Running Shoe",
"image": [
"https://www.example.com/images/trail-shoe.jpg"
],
"description": "A lightweight trail running shoe with a grippy sole and a waterproof upper.",
"brand": {
"@type": "Brand",
"name": "Example Outdoors"
},
"sku": "EX-TRAIL-42",
"offers": {
"@type": "Offer",
"url": "https://www.example.com/products/trail-shoe",
"price": "89.00",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock",
"itemCondition": "https://schema.org/NewCondition"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": 4.6,
"reviewCount": 128
}
}
</script>Where to paste the code
- WordPress: check what your SEO plugin (Yoast, Rank Math) already outputs, then add the block with a header-code plugin such as WPCode, or in your child theme's
header.phpbefore</head>. For one page only, use a Custom HTML block in that page. - Shopify: for site-wide markup such as Organization, go to Online Store › Themes › Edit code and paste it in
theme.liquidbefore</head>. For products, edit the product section (oftenmain-product.liquid) and use Liquid variables such as{{ product.title | json }}so every product gets its own values. Most themes already output basic Product markup. - Next.js: render it in the page component as
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(data).replace(/</g, "\\u003c") }} />. Escaping<stops a value from closing the script tag early; this site does the same. - Webflow: Page settings › Custom code › Inside <head> tag. For CMS collection pages, add it to the template's page settings and insert fields from the collection.
Test before you publish
Paste the code into Google's Rich Results Test, then test the live page once it's published. Make sure every value matches what people see on the page.
By Muhammad Saif · Updated
Questions
Why don't my product stars show in Google?
Google shows review stars only when the reviews are visible on the page, come from real customers and the markup matches them. Even then, showing them is Google's choice. Self-written or copied reviews can lead to a manual action.
Does Shopify add Product schema automatically?
Most Shopify themes output basic Product markup, but it's often missing GTIN, brand, reviews or shipping details. Check a product page in Google's Rich Results Test before adding more, so you don't end up with two conflicting Product blocks.
What's the difference between product snippets and merchant listings?
Product snippets are the price, stock and stars under a normal search result. Merchant listings appear in Shopping surfaces and need more: images, an offer, and ideally shipping and return policies.
Does schema markup improve rankings?
Not directly. Google has said structured data isn't a general ranking factor. It makes pages eligible for rich results, such as review stars, prices and breadcrumbs, which can make a result stand out and earn more clicks.
JSON-LD or Microdata?
JSON-LD. Google recommends it because it sits in one script block, separate from your HTML, so it's easier to add and maintain. Microdata and RDFa still work but are woven into the markup.