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

You've decided your site needs schema markup, and now you've hit a second decision nobody warned you about: JSON-LD or Microdata? Both show up constantly in tutorials, both claim to be "the way to do structured data," and picking wrong feels like it could mean redoing the work later.

The good news is that this isn't a close call for most sites. The two formats describe the exact same schema.org vocabulary, but they attach it to your page in completely different ways — and that difference is usually enough to make the choice obvious once you see it.

Quick Answer

JSON-LD and Microdata both create valid schema markup, but JSON-LD is a single, separate script block that sits anywhere on the page, while Microdata is a set of attributes woven directly into your existing HTML tags. JSON-LD is easier to add, update, and validate, which is why Google recommends it and most modern tools default to it. Microdata still works and is fully supported, but it demands more careful, ongoing HTML editing.

What are JSON-LD and Microdata?

Both are ways of writing schema.org structured data so search engines can read it. The vocabulary — Article, Product, FAQPage, and so on — is identical. Only the syntax and placement differ.

In practice, the difference comes down to where the work happens: JSON-LD asks you to write or generate one clean block, while Microdata asks you to annotate your template, tag by tag.

Why the format you choose matters

Both formats are read correctly by search engines, so this isn't a case of one working and the other not. The difference shows up in maintenance and risk:

📊 Quick stat Google's own structured data documentation recommends JSON-LD as the preferred format, largely because it reduces implementation errors compared to markup that's spread across individual HTML attributes.

Step-by-step: deciding and implementing

  1. Check what your CMS or plugin already outputs. Inspect a page's source code first — many sites already have JSON-LD in place from an SEO plugin, and duplicating it in Microdata would create conflicting markup.
  2. Default to JSON-LD for new schema. Unless you have a specific technical reason to tie data to visible HTML, JSON-LD is the more maintainable starting point for almost every site.
  3. Generate the JSON-LD snippet. Use a schema generator to pick a type and fill in a form — no manual syntax writing required.
  4. Paste it into a script or header field. Add the snippet inside your page's <head> or your CMS's custom code or structured data field.
  5. Only use Microdata if a system requires it. Some older CMS themes or specific plugins are hard-coded to output Microdata — in that case, work with the existing attributes rather than fighting the template.
  6. Never mix formats for the same entity. Pick one format per page element and keep it consistent, so there's no ambiguity about which version search engines should trust.
  7. Validate before publishing. Run the finished page through Google's Rich Results Test to confirm the markup — JSON-LD or Microdata — parses without errors.
Try the Rebrixe Schema Generator — free Pick a type, fill in a form, get ready-to-paste JSON-LD. No coding required.
Generate Schema Markup →

Common mistakes with either format

1. Running both formats for the same entity

Outputting JSON-LD from a plugin and Microdata from a theme for the same page describes one entity twice. If the two disagree on even one field, it creates confusion about which version is correct.

2. Editing Microdata attributes without checking the whole tag chain

Microdata properties depend on a parent itemscope and itemtype being intact. Removing or restructuring a wrapping element can silently disconnect child properties from their type.

3. Assuming JSON-LD needs to match the page's visual layout

Because JSON-LD is separate from the HTML, it's tempting to describe things loosely. It still has to reflect what's genuinely true and visible on the page — detachment from the layout doesn't mean detachment from accuracy.

4. Forgetting Microdata when a template changes

Since Microdata lives inside the HTML itself, a redesign or theme change can quietly strip it out along with the old markup, unlike JSON-LD, which survives independently of layout changes.

💡 Pro tip If you're not sure which format a page currently uses, view the page source and search for either application/ld+json or itemscope — that tells you immediately what you're working with before you add anything new.

Real-world examples

How the same schema type looks in practice depending on the format chosen:

Recipe blog
JSON-LD approach
One script block
Generates a single Recipe schema block and pastes it into the page header, independent of the recipe card's HTML layout.
Legacy e-commerce theme
Microdata approach
Attributes on tags
Product name, price, and availability are marked up with itemprop attributes directly on the existing product template tags.
WordPress + SEO plugin
JSON-LD, automatic
Zero manual editing
The plugin outputs Article and Organization JSON-LD automatically; no template attributes are touched at all.
Migrated site
Format conflict, resolved
Picked one
Old Microdata attributes were removed once a new JSON-LD generator covered the same schema, avoiding duplicate entity descriptions.

In every case, the underlying schema.org type was the same — only the syntax and where it lived on the page changed.

JSON-LD vs Microdata compared

A direct side-by-side of how the two formats behave across the factors that actually affect day-to-day work.

Factor JSON-LD Microdata
Placement Separate script block Embedded in HTML tags
Ease of updating Edit one block Edit template attributes
No-code tool support Wide, most generators Limited, theme-dependent
Google's stated preference Recommended Supported, not preferred
Survives a redesign Independent of layout Can be lost with the template
Best for Most sites, generators, plugins Legacy themes already using it

Generate your JSON-LD schema right now — free

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, and nothing to code — just fill in the form and copy the result.

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

Frequently asked questions

Google has stated a preference for JSON-LD and recommends it in its own structured data documentation, mainly because it's easier to implement and validate without errors. Microdata is still fully supported and read correctly, so existing Microdata does not need to be removed.
Technically yes, but it's not recommended. If both describe the same entity with conflicting details, it creates ambiguity about which version is accurate, so most sites pick one format per entity and stay consistent.
JSON-LD is easier for beginners because it lives in a single separate script block that a generator tool can produce entirely, with nothing to attach to visible page elements. Microdata requires editing the actual HTML tags around the content.
No. Both formats are parsed into the same underlying data, so switching formats while keeping the same information doesn't change how a page is understood, as long as the new markup is implemented correctly.
Microdata predates JSON-LD's widespread adoption and is still useful in specific cases, such as when structured data needs to stay tightly bound to visible HTML elements that a content management system already controls.
The large majority of modern SEO plugins, including Yoast and RankMath, output JSON-LD by default, which is part of why JSON-LD has become the more common format across the web.
The difference is negligible for either format at typical schema sizes. JSON-LD sits in one script tag while Microdata is spread across existing attributes, but neither meaningfully affects page load speed on its own.
JSON-LD is the more practical default for a new site, since it can be added independently of the visible template, updated without touching page content, and is the format most generators and plugins are built around.

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, and nothing to code, just a ready-to-paste code block.

Launch the Schema Generator →
← Back to blogs