Skip to content
PithLab

↑↓ to move · Enter to open · Esc to close

Schema Markup Generator (JSON-LD)

Fill in a form and get valid, safely escaped JSON-LD schema markup.

Keep it concise; long headlines may be truncated

Use via API

Generate schema.org JSON-LD structured data (Article, FAQ, HowTo, Product, LocalBusiness, Organization, Person, Event, Breadcrumbs, WebSite, Recipe), checked against Google's required and recommended properties. Send JSON, get JSON back.

POST https://pithlab.com/api/v1/tools/schema-markup-generator

curl https://pithlab.com/api/v1/tools/schema-markup-generator \
  -H "Authorization: Bearer $PITHLAB_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"FAQPage","values":"{\"mainEntity\":\"How long does delivery take? | Two to three working days in the UK.\\nCan I return an item? | Yes, within 30 days of delivery.\"}"}'

Fields and responseOpenAPI documentGet an API key

About the Schema Markup Generator

Create JSON-LD structured data for articles, FAQs, products, local businesses, events, recipes, breadcrumbs and more, with Google's required fields checked.

How to use the Schema Markup Generator

  1. Choose the schema type that matches the page, such as Product, Article or Local business.
  2. Fill in the fields. Lists such as FAQs, steps and breadcrumbs take one item per line, with | between parts.
  3. Fix any errors and review the required and recommended fields that are still missing.
  4. Copy the <script type="application/ld+json"> block into the page's HTML, then check it with Google's Rich Results Test.

Examples

Breadcrumbs with a final page that has no URL

Input

Home | https://example.com/
Books | https://example.com/books/
Science fiction

Output

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "name": "Home",
      "item": "https://example.com/"
    },
    {
      "@type": "ListItem",
      "position": 2,
      "name": "Books",
      "item": "https://example.com/books/"
    },
    {
      "@type": "ListItem",
      "position": 3,
      "name": "Science fiction"
    }
  ]
}
</script>
FAQ answer containing </script> is escaped

Input

Can I embed code? | Yes, e.g. </script>

Output

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "Can I embed code?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Yes, e.g. \u003c/script>"
      }
    }
  ]
}
</script>

Frequently asked questions

Where do I put the JSON-LD?

Paste the whole <script type="application/ld+json"> block anywhere in the page's HTML, in the <head> or <body>. It must describe content that is visible on that page. Google reads it when it crawls the page.

What is the difference between required and recommended fields?

Google's rich result documentation lists required properties, without which the page cannot get that rich result, and recommended ones that can improve it. The tool lists both as you type. Valid markup does not guarantee a rich result.

Why is < written as \u003c?

If text such as an FAQ answer contained </script>, it would end the script block early and could inject HTML into your page. Writing < as the JSON escape \u003c prevents that, and JSON parsers read it back as the same character.

Why are FAQ and how-to rich results not showing?

Since 2023 Google shows FAQ rich results only for well-known government and health sites, and no longer shows how-to rich results. The markup is still valid schema.org and other search engines and tools may use it.

Is my data sent anywhere?

No. The markup is built in your browser and nothing you type is uploaded or stored by this tool.