Skip to content

Product schema generator (JSON-LD)

Type your product's name, price and currency, and get Product code with a price and currency Google accepts.

  • Generator
  • 2 rules
  • Last updated

Product schema generator (JSON-LD)

Free, no sign-up, and it runs in your browser: nothing you type leaves it.

What it checks

  • The price: one number, in the digits 0 to 9 with a decimal point, even when you type it in Eastern Arabic digits such as ١٢٫٥٠٠.
  • The price's decimals for its currency: three for the Omani rial and the Kuwaiti and Bahraini dinars, two for the Saudi riyal and the UAE dirham.
  • The currency: a three-letter ISO 4217 code, such as OMR and SAR, not ر.ع. or "riyal".
  • The availability: a schema.org value, such as https://schema.org/InStock.
  • The code itself: valid JSON, with no stray comma and no missing quote.

Example

WrongHTML
<script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "Product",
    "name": "بن عربي مختص",
    "offers": {
      "@type": "Offer",
      "price": "4.500",
      "priceCurrency": "KWD",
    }
  }
</script>
RightHTML
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "بن عربي مختص",
  "offers": {
    "@type": "Offer",
    "price": "4.500",
    "priceCurrency": "KWD",
    "availability": "https://schema.org/InStock"
  }
}
</script>

How to fix

Fill in the fields, then copy the code and put it on the product's page, in the <head> or the <body>, one block for each product:

  • Keep the price and currency in the code the same as what visitors see on the page: Google asks that structured data match the page's content.
  • When the price or availability changes, change it in the code too.
  • If your store's platform writes this code itself, fix its settings or its theme rather than adding a second block for the same product.
HTML
<head>
  <title>بن عربي مختص | متجر الواحة</title>
  <!-- The code as the generator writes it -->
  <script type="application/ld+json">
    { "@context": "https://schema.org", "@type": "Product", "name": "بن عربي مختص" }
  </script>
</head>

FAQ

No. The code makes your page eligible for product rich results, but Google does not guarantee they show, and it decides when to show them.

Because the Omani rial is a thousand baisa, so ISO 4217 gives it three decimals, as it does the Kuwaiti and Bahraini dinars. We write the price with its currency's decimals as your browser's own data gives them.

Yes, write it as the page shows it: Arabic text is kept in the JSON as it is.

No. The generator runs in your browser, and nothing you type leaves it.

How we measure

Last updated Methodology and scoring

The generator runs in your browser. We read the price after turning Eastern Arabic and Persian digits and the Arabic decimal separator ٫ into Western ones, refuse anything that is not one number, and write it with its currency's number of decimals, as the browser's CLDR data gives it, taken from ISO 4217. We check the currency against the ISO 4217 list the product-offer-invalid rule uses, and write the code with JSON.stringify, so only valid JSON comes out, with every < in it written as < so that the text can never end the <script> element.