How to Add JSON-LD Structured Data to Your Website in 2026

A step-by-step guide for website owners, developers, and SEOs on adding JSON-LD structured data. Covers Article, Product, FAQ, Breadcrumb, and how to test with Google Rich Results.

How to Add JSON-LD Structured Data to Your Website in 2026

Structured data is one of the most underused SEO tactics. A study by Schema App found that fewer than 30% of websites use any form of structured data, yet pages with valid markup consistently earn higher click-through rates in search results. If your pages are not using JSON-LD, you are leaving traffic on the table.

What Is JSON-LD?

JSON-LD stands for JavaScript Object Notation for Linked Data. It is a way to describe the content of a web page in a format that search engines like Google, Bing, and Yandex can read with confidence. Instead of guessing whether a string of text is a title, an author name, or a price, the search engine gets a clear, structured object that answers those questions explicitly.

A JSON-LD block lives inside a simple HTML script tag:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "How to Add JSON-LD Structured Data",
  "author": { "@type": "Person", "name": "Your Name" },
  "datePublished": "2026-01-15"
}
</script>

This block does not affect how your page looks. It only helps machines understand it.

Why JSON-LD Matters for SEO

Google uses structured data to power rich results: star ratings, recipe cards, FAQ accordions, product carousels, event listings, and more. These enhanced results take up more visual space in the SERP and typically get higher CTR than plain blue links.

Beyond rich results, structured data helps Google build its Knowledge Graph. When your entity is well-described, it is more likely to appear in knowledge panels, featured snippets, and other prominent placements.

Our JSON-LD Generator can create complete markup for any schema type in seconds.

The Main Schema Types You Should Know

Article and BlogPosting

For blogs and news sites. Include headline, author, datePublished, dateModified, publisher, and image.

Product and Offer

For ecommerce product pages. Include name, description, price, priceCurrency, availability, and brand. Use our JSON-LD Generator to create valid product markup.

FAQPage

For pages with question-and-answer content. FAQ schema can produce an accordion-style rich result that takes up significant SERP real estate. Generate it with the JSON-LD Generator(/tools/json-ld-generator).

For navigation breadcrumbs. Helps Google understand your site hierarchy and can produce breadcrumb-style URLs in search results.

LocalBusiness

For local service businesses. Include name, address, telephone, opening hours, and geo coordinates.

How to Add JSON-LD to Your Site

Method 1: Direct HTML

Paste the JSON-LD script tag into the <head> or <body> of your page. Works on any static HTML site.

Method 2: WordPress

Use a plugin like Yoast SEO, Rank Math, or SEOPress. These plugins generate basic Article and WebSite schema automatically. For custom schema types, you can use a dedicated JSON-LD plugin or add the script directly to your theme's header.php.

Method 3: Shopify

Shopify themes can output JSON-LD in Liquid templates. Many premium themes include basic Product schema. For custom or enhanced product schema, modify your product-template.liquid file in the theme editor.

Method 4: JavaScript Frameworks

In Nuxt, Next.js, or other frameworks, use the framework's head management API to inject JSON-LD. In Nuxt, for example, you can use useHead or render <script type="application/ld+json"> inside your component template.

Testing Your Structured Data

Always test your JSON-LD before deploying:

  1. Google Rich Results Test: Paste your URL or code snippet at search.google.com/test/rich-results
  2. Schema.org Validator: Check for structural validity at validator.schema.org
  3. Google Search Console: After deployment, check the "Enhancements" section to see which rich result types Google has detected

Common JSON-LD Mistakes to Avoid

  • Making up data that does not exist on the page: If your page does not show star ratings, do not add AggregateRating schema. This violates Google's guidelines and can result in a manual action.
  • Forgetting to update dates: If an article is updated, the dateModified field should reflect that.
  • Using the wrong schema type: A blog post is a BlogPosting, not a NewsArticle. Pick the most specific type available.
  • Missing required fields: Every schema type has required properties. For Product, name is required. For Article, headline and datePublished are required. Our JSON-LD Generator highlights required fields to help you avoid these mistakes.

Key Takeaways

JSON-LD is not optional for competitive SERPs. It takes minutes to add, costs nothing, and can meaningfully impact your organic traffic. Start with your highest-traffic pages, test thoroughly, and expand from there.


Need to generate JSON-LD without writing code? Try our free JSON-LD Generator - it supports Article, Product, FAQ, Breadcrumb, Event, Organization, and LocalBusiness schema types.

Back to Blog