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

You know your site needs structured data. You've read that it can unlock rich results in search. But then you open a tutorial and hit a wall of unfamiliar terms — JSON-LD, Microdata, RDFa — three different ways to write what looks like the same information, with no clear answer on which one you're actually supposed to pick.

The good news: this decision is a lot simpler than it looks. All three formats describe the same schema.org vocabulary to search engines, they just differ in where the code lives and how much of your HTML it touches. Once you see them side by side, the right choice becomes obvious for almost every site.

Quick Answer

JSON-LD, Microdata, and RDFa are three syntaxes for writing the same schema.org structured data. JSON-LD lives in a single separate script block and is Google's recommended format because it's the easiest to add, edit, and validate. Microdata and RDFa are written directly inside your visible HTML using inline attributes, which makes them harder to maintain. For nearly every modern site, JSON-LD is the right default.

What are JSON-LD, Microdata, and RDFa?

All three are syntaxes for writing structured data — most commonly the schema.org vocabulary — into a webpage so search engines can read it. The vocabulary is identical across all three; only the way it's written differs.

The practical takeaway: this isn't a choice between three different kinds of structured data. It's a choice about how much you want that structured data entangled with your visible page markup.

Why the format you choose matters

Google parses all three formats correctly, so this isn't about rankings — it's about maintainability, risk, and how your workflow actually works day to day:

📊 Quick stat None of the three formats is a ranking factor, and Google's structured data documentation treats them as functionally equivalent for parsing purposes — the practical difference shows up entirely in how easy each one is to implement and maintain over time.

Step-by-step: choosing and implementing a format

  1. Default to JSON-LD unless you have a specific reason not to. For the vast majority of sites, JSON-LD is the right starting point — it's Google's recommended format and requires no changes to your existing HTML.
  2. Check what your CMS or theme already outputs. Some older WordPress themes and plugins still generate Microdata by default; check your page source before adding a second, conflicting format on top.
  3. Identify the schema.org type for the content. Whether you use JSON-LD, Microdata, or RDFa, the underlying type — Article, Product, FAQPage — needs to accurately match what's on the page.
  4. Write or generate the markup in your chosen format. Use a generator tool for JSON-LD, or carefully add itemscope/itemtype/itemprop attributes if you're extending existing Microdata.
  5. Only mark up content that's visible on the page. This rule applies identically to all three formats — invisible or fabricated data violates Google's structured data guidelines regardless of syntax.
  6. Avoid mixing formats for the same content. Pick one format per page for a given piece of content to prevent duplicate or conflicting data from confusing parsers.
  7. Validate with the Rich Results Test. Paste the page URL or code snippet in before publishing to confirm there are no errors, regardless of which format you used.
Try the Rebrixe Schema Generator — free Generate valid JSON-LD schema markup for Articles, Products, FAQs, and more.
Generate Schema Markup →

Common mistakes when working with these formats

1. Mixing two formats for the same content

Adding a JSON-LD block for Article data while an old theme still outputs Microdata for the same page creates duplicate, sometimes conflicting, structured data that can confuse validators and search engines alike.

2. Editing visible content without updating inline attributes

With Microdata and RDFa, updating a headline or price in the visible HTML doesn't automatically update the structured data sitting on the same element — the two can quietly drift apart until a validator catches the mismatch.

3. Assuming RDFa's extra flexibility is needed

RDFa supports vocabularies beyond schema.org, but most SEO-focused sites never use that capability. Choosing RDFa for its flexibility when only schema.org properties are needed just adds unnecessary complexity.

4. Never validating after a format migration

Switching from Microdata to JSON-LD without removing the old inline attributes can leave both formats live at once. Skipping validation afterward means a silent conflict can sit unnoticed indefinitely.

💡 Pro tip If you're starting from scratch, don't evaluate all three formats as if it were a close call. Default to JSON-LD, and only reach for Microdata or RDFa if you're extending a legacy system that already relies on one of them.

Real-world examples

The same Product data, written in each of the three formats, to show how the underlying facts stay identical while the syntax changes:

JSON-LD
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Trail Running Shoes",
  "offers": {
    "@type": "Offer",
    "price": "89.00",
    "priceCurrency": "USD"
  }
}
</script>
Microdata
<div itemscope itemtype="https://schema.org/Product">
  <span itemprop="name">Trail Running Shoes</span>
  <div itemprop="offers" itemscope itemtype="https://schema.org/Offer">
    <span itemprop="price">89.00</span>
    <meta itemprop="priceCurrency" content="USD">
  </div>
</div>
RDFa
<div vocab="https://schema.org/" typeof="Product">
  <span property="name">Trail Running Shoes</span>
  <div property="offers" typeof="Offer">
    <span property="price">89.00</span>
    <span property="priceCurrency" content="USD"></span>
  </div>
</div>
New site build
JSON-LD
Best default
Single script block, easy to template, no risk of touching visible markup.
Legacy theme
Microdata
Still works
Often already present in older CMS themes; safe to extend rather than replace.
Semantic web project
RDFa
Niche use
Useful when a site needs vocabularies beyond schema.org, otherwise rarely necessary.
Any format
Rich Results Test
Validation step
Confirms the markup parses correctly regardless of which syntax was used.

JSON-LD vs Microdata vs RDFa compared

A side-by-side look at how the three formats differ in practice, and where each one tends to fit best.

Format Where it lives Ease of use Best for
JSON-LD Separate script block Easiest to add and edit Nearly all modern sites; Google's recommended format
Microdata Inline HTML attributes Tied directly to markup Legacy sites already using it extensively
RDFa Inline HTML attributes More complex syntax Sites with existing RDFa-based content systems or broader semantic-web needs

Generate your JSON-LD schema markup right now — free

Skip the syntax debate entirely. The Rebrixe Schema Generator builds clean, validated JSON-LD for the most common schema types — Article, Product, FAQPage, Recipe, and more. No account, no watermark, just a ready-to-paste code block.

Free Schema Markup Generator Pick a type, fill in the fields, copy the JSON-LD.
Open Schema Generator →

Frequently asked questions

Google explicitly recommends JSON-LD for structured data whenever possible. It's the format used in almost all of Google's own documentation and examples, and it's the easiest to generate, validate, and maintain without touching the visible HTML.
Technically yes, but it's not recommended. Using more than one format for the same piece of content on the same page increases the risk of conflicting or duplicate data, which can confuse parsers and cause validation errors. Stick to one format per page.
For new projects, generally no. Microdata still validates and still works, but it requires editing the visible HTML directly, which makes it harder to maintain. It mainly still shows up on older sites or CMS themes that were built before JSON-LD became the standard.
RDFa has a steeper learning curve because it relies on a broader set of attributes and vocabularies beyond just schema.org, originally designed for the wider semantic web. Most SEO-focused sites don't need that flexibility, so simpler formats tend to win out.
No. Google parses JSON-LD, Microdata, and RDFa equally well and none of them is a ranking factor by itself. What matters for rich results is that the markup is valid and accurately reflects the visible content, not which syntax was used to write it.
Switching is safe as long as the new markup covers the same properties and validates correctly. A common path is migrating from inline Microdata to a separate JSON-LD block, since it can be added without editing the existing HTML at all.
JSON-LD, by a wide margin. Because it lives in a single self-contained script block instead of scattered across HTML attributes, it can be generated by a tool and pasted in without needing to understand or edit the surrounding page markup.

Generate your schema markup in seconds

The Rebrixe Schema Generator builds clean, valid JSON-LD for the most common schema types — no account, no watermark, just a ready-to-paste code block.

Launch the Schema Generator →
← Back to blogs