Aarunya AppsAarunya Apps
๐Ÿ” SEO6 min readยทJuly 8, 2026

JSON-LD vs Microdata vs RDFa: Which Format Should You Use?

Google supports three structured data formats: JSON-LD, Microdata, and RDFa. All three can enable rich results. Only one of them is worth using in 2026.

The short answer

Use JSON-LD. Google officially recommends it. It is the only format that keeps structured data completely separate from your HTML, making it easier to write, maintain, and test. The other two formats exist for legacy reasons and should not be chosen for new projects.

What each format looks like

JSON-LD โ€” structured data in a script tag (recommended)

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [{ "@type": "Question", "name": "Is this free?", "acceptedAnswer": { "@type": "Answer", "text": "Yes." } }]
}
</script>

Microdata โ€” attributes embedded in HTML (not recommended)

<div itemscope itemtype="https://schema.org/FAQPage">
  <div itemprop="mainEntity" itemscope itemtype="https://schema.org/Question">
    <h3 itemprop="name">Is this free?</h3>
    <div itemprop="acceptedAnswer" itemscope itemtype="https://schema.org/Answer">
      <p itemprop="text">Yes.</p>
    </div>
  </div>
</div>

RDFa โ€” a superset of Microdata, more flexible but more complex (not recommended)

<div vocab="https://schema.org/" typeof="FAQPage">
  <div property="mainEntity" typeof="Question">
    <h3 property="name">Is this free?</h3>
    <div property="acceptedAnswer" typeof="Answer">
      <p property="text">Yes.</p>
    </div>
  </div>
</div>

The comparison

CriterionJSON-LDMicrodataRDFa
Google recommendedโœ… Yesโš ๏ธ Supportedโš ๏ธ Supported
Separate from HTMLโœ… YesโŒ Inline attrsโŒ Inline attrs
Works with React/Next.jsโœ… Easyโš ๏ธ Manualโš ๏ธ Manual
Easy to test / validateโœ… Copy-pasteโš ๏ธ Harderโš ๏ธ Harder
Dynamic data supportโœ… JS objectโš ๏ธ Re-render DOMโš ๏ธ Re-render DOM
Can describe off-page contentโœ… YesโŒ Noโš ๏ธ Limited

When Microdata or RDFa might appear

  • โ†’Legacy CMS that inlines Microdata (e.g. old WordPress plugins) โ€” migrate to JSON-LD when you can
  • โ†’Content that must be semantically annotated for non-Google consumers (academic publishing, government data portals)
  • โ†’Existing RDFa-heavy Drupal or older Joomla sites โ€” migration cost may not be worth it

The one exception: Open Graph tags

Open Graph tags (og:title, og:image, etc.) are not Schema.org and use neither JSON-LD, Microdata, nor RDFa. They live in <meta> tags in your <head> and control how links appear when shared on LinkedIn, X, Slack, and iMessage. They are separate from structured data entirely and are always required alongside your JSON-LD.

To generate JSON-LD without writing it by hand, use the Schema.org JSON-LD Generator โ€” supports FAQPage, Product, Article, LocalBusiness, and BreadcrumbList with live validation and a copy button.

Try the related tool

Schema.org JSON-LD Generator โ€” free, runs 100% in your browser.

Open Schema.org JSON-LD Generator โ†’

Enjoyed this? Get notified when Pro launches.