Back to Blog

Structured dataSEO

Structured data with JSON-LD: a developer's guide

By Vladislav Savko · Jul 11, 2026 · 8 min read

Structured data is how you tell search engines what your content means, not just what it says. Do it well and you become eligible for rich results — star ratings, FAQ dropdowns, breadcrumb trails — that take up more space in the SERP and earn more clicks. This is the practical, code-first version for people who ship HTML.

What structured data does

A search engine reading your recipe page sees words. Add structured data and it sees a Recipe with a name, cook time, rating and ingredient list — machine-readable facts it can trust. That understanding powers two things: rich results (enhanced SERP listings) and better entity understanding (Google connecting your page to the right topics and knowledge-graph entries).

It does not directly boost rankings. What it does is make your existing ranking position far more clickable, which is often the cheaper win.

Why JSON-LD

There are three ways to mark up a page — Microdata, RDFa and JSON-LD. Google recommends JSON-LD, and so do I, for one reason: it lives in a single <script> block in the <head> instead of being tangled through your HTML. That means you can generate it from your data layer, template it, and change your markup without touching your visible DOM.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "name": "Example",
  "url": "https://example.com/"
}
</script>

Every block starts with @context (always schema.org) and an @type. The rest is just the properties that type supports.

Article schema

For a blog post, Article (or BlogPosting) is the workhorse. The properties Google actually uses are the headline, images, dates and author:

{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "Structured data with JSON-LD",
  "image": "https://example.com/og.png",
  "datePublished": "2026-07-11",
  "dateModified": "2026-07-11",
  "author": { "@type": "Person", "name": "Jane Dev" },
  "publisher": {
    "@type": "Organization",
    "name": "Example",
    "logo": { "@type": "ImageObject", "url": "https://example.com/logo.png" }
  }
}

Keep it honest: the headline should match your visible <h1>, and the dates should be real. Marking up content that isn't on the page is the fastest way to get a manual action.

FAQ & Breadcrumb schema

Two more give you visible wins with almost no effort. BreadcrumbList replaces the ugly green URL in the SERP with a clean navigation trail:

{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    { "@type": "ListItem", "position": 1, "name": "Blog", "item": "https://example.com/blog/" },
    { "@type": "ListItem", "position": 2, "name": "SEO", "item": "https://example.com/blog/seo/" }
  ]
}

FAQPage can surface expandable questions right in the results — but only mark up questions that genuinely appear on the page, and note Google has narrowed FAQ rich results to authoritative government and health sites in many cases. Use it where it fits, don't force it.

Common mistakes

The three that trip people up most: (1) marking up content the user can't see on the page; (2) leaving required properties out — a Product without a price or a Recipe without ingredients simply won't qualify; and (3) shipping invalid JSON. A single trailing comma kills the whole block silently. Validate before you trust it.

How to test it

Use Google's Rich Results Test and the Search Console enhancement reports to confirm eligibility, and the Schema.org validator for strict correctness. For a quick check while you build, SEO Inspector extracts and pretty-prints every JSON-LD, Microdata and RDFa block on the current page, so you can see exactly what markup you're shipping — and whether it parses at all — without leaving the tab. Pair this with a clean on-page setup and your pages give search engines everything they need.

Vladislav Savko
Written by Vladislav Savko Full-stack developer & SEO specialist

Full-stack developer with 10+ years building websites, web apps and browser extensions, plus hands-on technical SEO — the experience behind the tools and guides here.

About the author →
Share 𝕏 Share on X

Try SEO Inspector — free →