How to Add Rich Snippets in HTML: A JSON-LD Guide (2026)

Updated August 2026 · 10 min read · By MintShovels Team

Rich snippets make your search result stand out — stars, FAQs, and product info shown before the click. You add them with structured data called JSON-LD, and the simplest method needs only one block of code in your page's head.

What rich snippets actually are

Rich snippets are enhanced search results: a recipe with a photo and rating, an FAQ with expandable questions, a product with price and availability. They appear because the page contains structured data that labels the content for search engines. Without it, Google has to guess — and usually shows nothing extra.

JSON-LD, explained in one sentence

JSON-LD is a block of JSON placed in your <head> that says "this page is an article, and here are its facts." It's the format Google explicitly recommends, and it's the easiest to add because it lives separately from your HTML markup.

A working FAQ snippet

Here is the full JSON-LD you can paste into any page that has a FAQ section:

{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [{
    "@type": "Question",
    "name": "How do I add rich snippets?",
    "acceptedAnswer": {
      "@type": "Answer",
      "text": "Add JSON-LD structured data to your page head, then test it in Google's Rich Results Test."
    }
  }]
}

Replace the question and answer with your own. Every question in your visible FAQ should have a matching entry — Google requires the visible content and the markup to match.

Article and Product examples

For a blog post, use Article schema with headline, author, and datePublished. For a product page, use Product with name, image, and offer price. Both follow the same pattern: one @type, plus the properties that describe it.

Test before you ship

Two free checks catch most mistakes: Google's Rich Results Test validates the JSON, and Search Console's enhancements report shows which pages earned rich results. Our Schema Markup generator builds valid JSON-LD from a few inputs, and the free audit checks whether your structured data is present and valid.

Common mistake: Writing JSON-LD by hand and breaking the syntax with a stray comma. A validator catches it in seconds — always test, never trust the preview.
Run a free SEO audit on your site
70+ checks across 12 dimensions — no signup needed.
Start your free audit →