Home / Free tools / Text & Data / JSON-LD Product Schema Generator

JSON-LD Product Schema Generator

Fill in the product facts and get valid schema.org Product and Offer markup in JSON-LD, ready to paste into the product page. The GTIN check digit, price format and currency code are validated as you type. Nothing is uploaded.

Runs in your browser. Nothing you paste or choose is uploaded or stored.

What this JSON-LD product schema generator does

Structured data is how a product page tells a search engine, in a machine-readable form, what it sells and for how much. The usual format is JSON-LD: a small block of JSON in a script tag that uses the schema.org vocabulary. Writing it by hand is easy to get wrong, because a missing comma, a price with a currency symbol or a GTIN with a wrong check digit invalidates the block, and you only find out when Search Console complains. This generator builds the block from plain form fields, validates the values that most often go wrong, and outputs a script tag you can paste into the page.

It produces a Product with an Offer and, when you fill them in, brand, colour, several images, a GTIN of the right type, a price valid until date, a seller, shipping details and a merchant return policy. An aggregate rating is optional and comes with a warning, because it must reflect real reviews.

How to use it

  1. Fill in at least the product name, the price and the currency code. The markup appears below as soon as the input is valid, and a list of fixes and checks appears above it.
  2. Add the images as full addresses starting with https://, one per line. Add the GTIN without spaces or hyphens: the tool works out whether it is a GTIN-8, 12, 13 or 14 and checks the final digit. If you have no GTIN, enter the MPN instead.
  3. Pick the availability and the condition from the lists. Set a price valid until date if the price is for a limited time.
  4. Press Copy script tag, paste it into the HTML of the product page, then test the live page with Google's Rich Results Test and watch the Enhancements reports in Search Console.

Worked example

For the example product, a Ceramic Coffee Mug 12 oz by Example Ceramics, with the GTIN 4006381333931, a price of 14.99 USD, shipping of 4.95 USD to the US, a 30-day return window and a price valid until 2027-12-31, the tool produces a Product with gtin13 set to the GTIN, an Offer with price "14.99", priceCurrency "USD" and availability "https://schema.org/InStock", a shippingDetails block with a rate of 4.95 USD and the destination US, and a hasMerchantReturnPolicy block with a finite 30-day window. The price is written as a string with a dot as the decimal separator, which is how schema.org and Google expect it, and the currency is a three-letter ISO 4217 code.

Rules that keep markup valid

Structured data and Google Merchant Center

Product markup on your pages and your product feed serve different parts of Google. The feed feeds Shopping ads and free listings through Merchant Center, and markup helps Google understand the page and can support product snippets and merchant listings in Search. They should agree. If the feed says 14.99 and the markup says 15.99, expect warnings in both places. The feed checker tests a feed file before you upload it, and the Merchant Center issue explainer translates the messages you get back.

When you want to inspect or reformat the output, the JSON formatter pretty-prints, minifies and validates any JSON, including the JSON-LD from this generator.

What this generator does not do

It covers the common single-product case. It does not generate markup for product variants with several offers, for products with many reviews listed individually, or for the full range of shipping rules such as different rates per region and handling times. It does not check that your page contains the same information, and it cannot tell you whether Google will show rich results. Treat the output as a clean, valid starting point and test the page it goes on.

Questions

What is JSON-LD product markup?

It is a block of structured data, written as JSON inside a script tag, that tells search engines the name, price, availability and other facts of a product on a page. It follows the schema.org vocabulary, which Google reads for product snippets and merchant listings.

Will this markup get rich results?

No tool can promise that. Google decides whether to show rich results, and the markup must match what visitors see on the page. Valid markup is a requirement, not a guarantee. Test the final page with Google's Rich Results Test.

Which fields are required?

For a product with an offer, Google needs the product name and an offer with a price and currency. Image, availability, brand and a GTIN or MPN are strongly recommended, and shipping and return details help merchant listings. The generator reports errors for what is missing or invalid.

Where do I put the script tag?

Paste it into the HTML of the product page, in the head or the body. Do not put it on category pages for products that are not the main subject. Make sure each page describes only the product on that page.

Why is there a warning about ratings?

Ratings must come from real customer reviews that visitors can see on the page. Markup with invented or unrelated ratings goes against Google's guidelines and can lead to a manual action, so leave the fields empty unless the ratings are real.

Is anything sent to a server?

No. The markup is built in your browser from what you type. The values are not uploaded or stored. The data you enter is not saved in the page address either.

Google, Merchant Center, YouTube, LinkedIn, Indeed, Glassdoor and Shopify are trademarks of their owners. Van Born Labs is independent and not affiliated with them. Google's own help pages are the final word on its rules.