Structured data can be written three ways — JSON-LD, Microdata, and RDFa — and while all three are valid, Google recommends JSON-LD, and for good reasons: it separates the data from your HTML, which makes it dramatically easier to add, template, and maintain. Understanding the difference matters mostly when you inherit a site using inline Microdata and want to modernize. This reference compares the three and covers how to migrate cleanly.
The Three Syntaxes
JSON-LD is a self-contained script block; Microdata and RDFa are inline — they annotate your existing HTML with attributes (itemscope, itemprop for Microdata; vocab, typeof, property for RDFa).
All three express the same Schema.org vocabulary and all three are understood by Google. The difference is entirely in where the data lives — in one block, or scattered through your markup as attributes on visible elements.
Why Google Recommends JSON-LD
Because it decouples structured data from presentation: you can add or change it without touching your HTML layout, generate it from a template or plugin, and keep it in one place — which is why every example in this cluster uses JSON-LD.
Inline formats break more easily (a layout change can strip an itemprop), are harder to audit, and are painful to template. JSON-LD’s single-block model is what makes plugin-generated schema reliable, the pattern behind the platform-owned Organization and Article markup.
How They Compare
JSON-LD: easiest to add and maintain, Google-preferred, separate from HTML. Microdata: inline, tied to visible elements, harder to maintain. RDFa: inline like Microdata, more expressive but rarely needed for SEO.
For SEO purposes there is no capability JSON-LD lacks that would justify choosing an inline format. RDFa’s extra expressiveness matters for linked-data applications, not typical search markup. Unless a constraint forces otherwise, JSON-LD is the answer.
Migrating Off Inline Markup
To modernize a Microdata/RDFa site, rebuild the same entities as JSON-LD blocks, remove the inline attributes to avoid duplicate data, then validate that the JSON-LD matches what the inline markup expressed.
Do it type by type: recreate the entity in JSON-LD, confirm it validates, remove the old inline attributes, and re-check with the Rich Results Test so you do not leave two copies. Leaving both creates duplicate structured data, the same problem discussed for Article.
Example: The Same Data Three Ways
The JSON-LD form (recommended) is a clean block (shown as code):
<script type="application/ld+json">
{ "@context": "https://schema.org", "@type": "Person", "name": "Jane Doe" }
</script>
The Microdata form scatters attributes on HTML: <div itemscope itemtype="https://schema.org/Person"><span itemprop="name">Jane Doe</span></div>. Both mean the same thing; the JSON-LD is far easier to manage.
- Three valid syntaxes exist — JSON-LD (a script block) and the inline Microdata and RDFa.
- Google recommends JSON-LD because it separates data from HTML and is easy to template and maintain.
- Inline formats break more easily and are harder to audit; JSON-LD powers reliable plugin-generated schema.
- For SEO, JSON-LD lacks no needed capability — there is rarely a reason to choose inline formats.
- Migrate type by type: rebuild as JSON-LD, remove inline attributes, validate to avoid duplicates.
Frequently Asked Questions
Is JSON-LD better than Microdata for SEO?
Yes for practical purposes — Google recommends it, and it is far easier to add, template, and maintain because it lives in one block separate from your HTML. Microdata is valid but harder to manage and breaks more easily.
Can I mix JSON-LD and Microdata?
Technically Google can read both, but mixing them for the same entity risks duplicate structured data. Pick one format per entity — preferably JSON-LD — and remove the other to keep a single clean copy.
Do I need RDFa?
Rarely for SEO. RDFa is more expressive and useful for linked-data applications, but typical search markup does not need that expressiveness. JSON-LD covers standard structured-data needs more simply.
How do I migrate from Microdata to JSON-LD?
Rebuild each entity as a JSON-LD block, validate that it matches the original, then remove the inline itemscope/itemprop attributes so you do not have two copies. Work type by type and re-test after each to avoid duplicates.
The Bottom Line
The format question has a clear answer: use JSON-LD. It is Google-preferred, easy to maintain, and separate from your HTML, which is why it underpins every reference in this cluster. If you are on inline Microdata, migrate type by type and remove the old attributes — clean, single-copy JSON-LD is the foundation the rest of the schema cluster assumes.
Further reading & sources
- Intro to structured data (formats) — Google Search Central
- JSON-LD — json-ld.org
See how your site actually shows up in AI search. An AI visibility audit maps where you’re cited, where you’re invisible, and what to fix first — in plain English.
Get your AI visibility auditTry the free SEO tools →
Prefer self-serve? The interactive checklists turn guides like this one into a working to-do list.
Keep reading in Schema Markup
Get one email when something genuinely changes
AI search moves fast and most of it is noise. We send one short email when a real shift is worth your time. Unsubscribe anytime.
Published by Plain Intelligence — practical AI SEO, GEO, and technical SEO, documented in plain English. About Plain Intelligence →
↑ Back to Schema Markup · Explore all articles · Free tools & resources · Glossary