How to add structured data (JSON-LD)
Structured data helps search engines and AI systems understand your pages. Here's how to add valid JSON-LD that matches your visible content and earns rich results.
Structured data is a machine-readable description of your page's meaning — who you are, what an article is about, a product's price, a recipe's steps. Search engines use it for rich results (star ratings, FAQs, breadcrumbs) and AI systems use it to understand your entities. The recommended format is JSON-LD in a script tag.
Use JSON-LD#
Of the three formats (JSON-LD, Microdata, RDFa), use JSON-LD — it lives in one script tag and doesn't tangle with your markup. Place it in the <head> or <body>:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "Acme Widgets",
"url": "https://acme.com",
"logo": "https://acme.com/logo.png",
"sameAs": [
"https://www.linkedin.com/company/acme",
"https://en.wikipedia.org/wiki/Acme"
]
}
</script>The types worth adding#
- Organization / WebSite — site-wide identity and sitelinks search box. Add the
sameAslinks to strengthen your entity for AI. - Article / BlogPosting — for content pages: headline, author, dates, image.
- BreadcrumbList — shows the breadcrumb path in results.
- FAQPage — mark up Q&A to be eligible for FAQ rich results and easy AI extraction.
- Product / LocalBusiness — price, availability, ratings, address, hours.
The golden rule#
- Keep JSON-LD in sync with the visible page — same title, same price, same answers.
- Server-render it so crawlers and AI fetchers see it in the initial HTML.
- Use one
@typeper real thing; combine with@graphif a page has several.
Validate it#
Invalid JSON-LD is silently ignored. Extract and validate a page's markup with the Structured Data Checker, and build valid records with the JSON-LD Generator. Google's Rich Results Test confirms eligibility for specific rich results.
Frequently asked questions
▸ ▾ Does structured data improve rankings?
Not directly as a ranking factor, but it can earn rich results (FAQs, ratings, breadcrumbs) that raise click-through, and it clarifies your entities for search and AI — which supports discovery. It's high-leverage for little effort.
▸ ▾ JSON-LD vs Microdata vs RDFa — which should I use?
JSON-LD. Google recommends it, it's the cleanest to maintain (one script block, separate from your HTML), and it's the easiest for AI systems to parse.
▸ ▾ Where should the JSON-LD script go?
Either the head or the body works. What matters is that it's in the server-rendered HTML and accurately describes visible content.
Do it with a free tool
Related guides
Published 2026-07-09 · Updated 2026-07-09 · By Crawlsonar.