Site SEO AI Auditمن Internet Solutions

JSON-LD vs Microdata vs RDFa: Which Structured Data Format?

25 سبتمبر 2026وقت القراءة: 8 دSEO التقني
JSON-LD vs Microdata vs RDFa: Which Structured Data Format?

Short answer: JSON-LD, Microdata and RDFa are three syntaxes for adding the same Schema.org structured data to a page. JSON-LD puts the data in a separate script block; Microdata and RDFa add attributes to the visible HTML elements. Google supports all three but recommends JSON-LD because it is easier to write, maintain and generate from data. For new work, use JSON-LD; for existing Microdata that is valid, migrate only when you are rebuilding templates anyway.

What they have in common

All three formats express structured data: machine-readable statements such as “this page is a Product named Trail X, priced 89 euros, in stock”. In SEO, the vocabulary used is almost always Schema.org, which defines types such as Product, Article, Organization, LocalBusiness, Event and BreadcrumbList, and their properties. The format is just the way those statements are written into the page.

Choosing a format is therefore mostly a question of maintenance, not of search performance. The format decides who can edit the markup, how easily it is generated from your data, how likely it is to break during a redesign and how quickly problems can be found. Those practical questions should drive the choice, especially on sites where content is edited by several people and templates change over the years.

Search engines read the statements, not the format. A valid Product in JSON-LD and the same valid Product in Microdata are equivalent for rich result eligibility. Google’s introduction to structured data lists the supported formats and recommends JSON-LD.

The three formats

Here is how each format looks in practice, with its main strengths and weaknesses. The examples describe simple entities; real pages usually combine several types, such as an Organization, a WebPage and a Product or Article.

JSON-LD

JSON-LD (JavaScript Object Notation for Linked Data) places the data in a <script type="application/ld+json"> block, usually in the head or at the end of the body:

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

Strengths:

Weakness: because it is separate, it can drift out of sync with the visible content, for example showing an old price, if it is not generated from the same data.

Microdata

Microdata adds attributes to existing HTML elements: itemscope, itemtype and itemprop:

<div itemscope itemtype="https://schema.org/Product">
  <h1 itemprop="name">Trail X</h1>
  <div itemprop="offers" itemscope itemtype="https://schema.org/Offer">
    <span itemprop="price" content="89.00">€89</span>
    <meta itemprop="priceCurrency" content="EUR">
  </div>
</div>

Strengths:

Weaknesses:

RDFa

RDFa (Resource Description Framework in attributes) also uses HTML attributes, such as vocab, typeof and property. It is more general than Microdata and can mix several vocabularies, which is why it appears in some publishing and government systems and in certain CMS platforms. For typical business websites and shops, it offers no advantage over JSON-LD and has the same fragility as Microdata.

Side-by-side comparison

JSON-LD Microdata RDFa
Location Separate script block Attributes in HTML Attributes in HTML
Google recommendation Recommended Supported Supported
Ease of maintenance High Low to medium Low to medium
Risk from redesigns Low High High
Risk of mismatch with page Medium, if not generated from same data Low Low
Linking entities Easy with @id and @graph Possible, clumsy Possible
Typical source SEO plugins, modern frameworks Older themes, shop templates Some CMS and publishing systems

Mixing formats: the duplicate problem

You can use different formats on the same page, but describing the same entity twice, once in Microdata from the theme and once in JSON-LD from a plugin, is a common source of problems. Search engines may see two Products with slightly different data, two Organizations with different logos, or two BreadcrumbLists with different paths. Results range from ignored markup to warnings in Search Console.

Before adding JSON-LD through a plugin, check the page source for itemscope, itemtype and typeof attributes. If the theme already outputs Microdata for the same types, disable one of the sources.

Migrating from Microdata to JSON-LD

  1. Inventory the types and properties currently marked up on each template, using the Rich Results Test or a crawl that extracts structured data.
  2. Build equivalent JSON-LD from the same data sources the template uses, so values stay identical to what is displayed.
  3. Remove the Microdata attributes in the same release, to avoid a period of duplicates.
  4. Test on staging with the Rich Results Test for every template.
  5. Monitor Search Console’s enhancement reports for a few weeks after release.

If the existing Microdata is valid and complete, there is no urgency. Migration is best done during a theme update or redesign, when templates are being rewritten anyway. Until then, focus on keeping the existing markup accurate and complete.

Connecting entities with @id and @graph

One of JSON-LD’s practical advantages is how easily it connects entities. Instead of repeating the full Organization inside every Article as publisher, you describe the Organization once with an @id, such as https://www.example.com/#organization, and refer to it from other entities by that identifier. A @graph array holds all the entities for the page in one block:

Many SEO plugins produce exactly this structure. The benefit is consistency: the organisation’s name and logo are defined once, so they cannot drift apart between templates. When debugging, check that every @id reference points to an entity that actually exists in the graph.

Which types most sites need

The format question matters less than choosing the right types. For most small business sites, shops and blogs, a short list covers the essentials:

Adding every possible type does not help. Accurate, complete markup for the content you actually have does.

Where to place JSON-LD

How Site SEO AI Audit checks structured data

Structured data is one of the seven areas in the audit. SEOAuditBot reads the Schema.org markup on each page and reports invalid JSON-LD and pages without structured data, along with Open Graph tags and share images. Because issues are weighted by how many pages they affect, a template that outputs broken JSON or no markup at all stands out clearly. WordPress sites get the steps to fix it in the relevant plugin. See plans.

Related reading

The bottom line

JSON-LD, Microdata and RDFa carry the same Schema.org data in different ways. Use JSON-LD for new work because it is easiest to generate, test and maintain; keep valid existing Microdata until you rebuild the templates; and never describe the same entity twice in different formats.

الأسئلة الشائعة

Is JSON-LD better for SEO than Microdata?

Not for rankings or eligibility: search engines treat valid data in either format the same way. JSON-LD is recommended because it is easier to implement and less likely to break.

Can I use JSON-LD and Microdata on the same page?

Yes, but avoid describing the same entity in both. Duplicate, conflicting descriptions of the same product or organization can cause the markup to be ignored or produce warnings.

Does JSON-LD have to be in the head?

No. It can be placed in the head or the body. What matters is that it is in the page’s HTML and valid.

Should I convert my existing Microdata to JSON-LD?

If it is valid and complete, there is no urgency. Convert when you are redesigning or rebuilding templates anyway, and remove the Microdata in the same release.

Can JSON-LD include information not shown on the page?

It should describe the page’s content. Some supporting details, such as identifiers, are acceptable, but important facts like prices, ratings and availability must match what visitors see.

#JavaScript SEO#Structured data#Technical SEO
افحص موقعك — مجانًا.كل مشكلة SEO في موقعك — وكيف تصلحها بالضبط.
ابدأ مجانًا

المزيد من المدونة

كل المقالات ←
Internet Solutions

المزيد من فريقنا

من تطوير Internet Solutions. جرّب بقية منتجاتنا — كل منها يوفّر وقتك بطريقة مختلفة.

internet-solutions.net ↗
01النشر التلقائي على وسائل التواصل
PostRSS

تنتقل المنشورات الجديدة من خلاصة RSS الخاصة بك تلقائيًا إلى Facebook وX وLinkedIn وTelegram وأكثر من 60 شبكة أخرى.

خطة مجانية · منذ 2014زيارة ←
02دردشة مباشرة بالذكاء الاصطناعي للمواقع
Talkmio

يجيب موقعك على الزوار على مدار الساعة من محتواك أنت وبلغتهم.

خطة مجانية · دون بطاقةزيارة ←
03مساعد بالذكاء الاصطناعي
Ask Mio

دردشة وبرمجة وتصميم وكتابة وبحث. يختار Mio أفضل نموذج لكل مهمة.

خطة مجانيةزيارة ←
04طيار آلي بالذكاء الاصطناعي للمدونة ووسائل التواصل
AI Blog Autopilot

يكتب الذكاء الاصطناعي مقالات SEO من 2000 إلى 3000 كلمة وينشر كل مقال على أكثر من 58 شبكة اجتماعية.

أول 3 مقالات مجانًازيارة ←
05فحص صحة الموقع
Site AI Audit

تحسين محركات البحث والسرعة وSSL والأمان وإعداد البريد الإلكتروني في تقرير واحد، مرتّبة حسب ما يجب إصلاحه أولًا.

أول تدقيق مجانيزيارة ←
06خلاصات RSS والمنتجات
RSS Feed Creator

أنشئ RSS من أي صفحة ويب، بالإضافة إلى خلاصات منتجات لـ Google وMeta تتحدّث تلقائيًا.

خطة مجانيةزيارة ←
07تطوير المواقع وتحسين محركات البحث
Internet Solutions

مواقع ومتاجر إلكترونية وأنظمة مخصّصة، يصمّمها فريقنا ويبنيها ويديرها.

منذ 2011زيارة ←
Site SEO AI Audit
نظرة عامة على الخصوصية

يستخدم هذا الموقع ملفات تعريف الارتباط حتى نتمكن من تقديم أفضل تجربة ممكنة لك. تُخزَّن معلومات ملفات تعريف الارتباط في متصفحك وتؤدي وظائف مثل التعرّف عليك عند عودتك إلى موقعنا ومساعدة فريقنا على فهم أقسام الموقع التي تجدها أكثر إثارة للاهتمام وفائدة.