Volver al blog
AI Schema Generator6 min de lectura20 de abril de 2026

What is JSON-LD and Why Google Prefers It for Schema Markup

JSON-LD is the schema markup format recommended by Google. Understanding why it is preferred over Microdata or RDFa, and how it works, is the first step to implementing it correctly on your site.


When we talk about schema markup, we are actually talking about three possible formats for adding structured data to a web page: Microdata, RDFa, and JSON-LD. All three do the same thing — communicate to search engines what type of content the page contains — but in very different ways. Google explicitly recommends JSON-LD over the other two. Understanding why helps you implement it correctly.

The three schema markup formats

FormatWhere it is placedAdvantageDisadvantage
MicrodataInside HTML as tag attributesSemantics integrated with visible contentComplicates maintenance, mixed code
RDFaInside HTML as tag attributesCompatible with broader W3C standardsComplex syntax, rarely adopted in practice
JSON-LDIndependent <script> block in <head> or <body>Code separate from HTML, easy to maintainNot directly integrated with the visible DOM

Why Google recommends JSON-LD

Google has officially declared its preference for JSON-LD in its technical documentation. The practical reasons are clear:

  • Separation of concerns: the schema lives in an independent <script> block, without mixing with the content HTML. This greatly simplifies maintenance and updates.
  • Dynamic injection: it can be added and modified with JavaScript without touching existing HTML, making it compatible with React, Vue, or Next.js applications.
  • Readability: it is much easier to read, write, and debug than Microdata or RDFa, where the schema is spread across all the HTML.
  • Portability: the same JSON-LD block can be copied across pages with minimal modifications.

Basic structure of a JSON-LD

Every schema.org JSON-LD follows the same basic structure: it is wrapped in a <script type="application/ld+json"> tag and inside is a JSON object with at least two properties: @context (always "https://schema.org") and @type (the entity type: Article, Product, LocalBusiness, etc.).

  • @context: always "https://schema.org" — indicates the vocabulary being used.
  • @type: the type of entity the schema describes (Article, Product, FAQPage, etc.).
  • Type-specific properties: name, description, URL, image, price, author... they depend on the chosen @type.
  • @id: optional but recommended — a unique URL that identifies the entity unambiguously.

Most commonly used types and their rich results

@typeRich result in GoogleImplementation difficulty
Article / BlogPostingImage, author, and date in AMP and Top Stories resultsLow
ProductStars, price, availability in product resultsMedium
FAQPageExpandable questions directly in the SERPLow
HowToNumbered steps in the SERP (desktop and mobile)Low
LocalBusinessKnowledge Panel with address, hours, and ratingsMedium
EventDate, location, and price in event resultsLow
RecipeImage, prep time, calories in recipe resultsMedium
BreadcrumbListBreadcrumb trail in the SERP URL displayLow

Most common errors when implementing JSON-LD

  • Invalid JSON: an extra comma, an unclosed brace, or incorrect quotes invalidate the entire schema. Always validate with a JSON linter before publishing.
  • Missing required properties: each type has minimum required properties. Without them, Google won't activate the rich result.
  • Content that doesn't match the page: the schema must describe the actual content of the page. Incorrect prices or false ratings can result in a manual penalty.
  • Schema on the wrong pages: a Product schema on a blog page or an Article schema on a product page confuses Google.
  • Multiple conflicting schemas of the same type: if you have two Product schemas with different prices, Google picks one and may display incorrect data.

Generate your JSON-LD in seconds with AI

iRankly's AI Schema Generator analyzes your page content or the description you provide and automatically generates a valid and complete JSON-LD for the schema type you need. No syntax errors, with all fields recommended by Google.

Prueba la herramienta gratis

AI Schema GeneratorAnaliza tus URLs con {tool} de iRankly. Sin registro, sin tarjeta.

Usar herramienta gratis

Prueba la herramienta gratis

Analiza tus URLs con AI Schema Generator de iRankly. Sin registro, sin tarjeta.

Usar herramienta gratis