Skip to content
AEO Canon · the reference for answer-engine optimization

JSON-LD vs Microdata vs RDFa — Which to Use

Use JSON-LD. It lives in a separate script block, is the easiest format to add and maintain, and is the one Google recommends. Microdata and RDFa embed markup as inline HTML attributes, which is verbose and harder to maintain — and both Google and AI parsers favor JSON-LD.

BBurke Atkerson1 min read

Use JSON-LD. It lives in a separate script block, is the easiest format to add and maintain, and is the one Google recommends. Microdata and RDFa embed markup inline in your HTML — verbose and harder to maintain — and both Google and AI parsers favor JSON-LD.

Quick answer

All three encode the same schema.org vocabulary, but they differ in where the markup lives. JSON-LD is a self-contained script block — easiest to maintain and Google's recommended format. Microdata and RDFa scatter attributes inside your HTML tags, which is verbose and error-prone. Choose JSON-LD.

What's the difference between the three?

Placement. JSON-LD is a standalone <script type="application/ld+json"> block that never touches your visible markup. Microdata adds itemscope, itemtype, and itemprop attributes directly onto your HTML tags. RDFa is similar — inline attributes like typeof and property — and tends to be the most verbose of the three.

Which one does Google recommend?

JSON-LD. Google names it as the preferred format, and the reasons are practical: it keeps data separate from presentation, it's easy to generate from typed content, and it's simple to validate as one block. AI parsers benefit from the same trait — a clean, isolated object is trivial to lift.

The three schema.org formats compared
FormatWhere it livesMaintainabilityRecommended?
JSON-LDSeparate <script> blockEasiest — one isolated objectYes — Google's pick
MicrodataInline HTML attributesHarder — tangled with markupWorks, not preferred
RDFaInline HTML attributesHardest — most verboseWorks, not preferred

A small, self-contained block like this:

{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "AEO Canon",
  "url": "https://aeocanon.com",
  "sameAs": [
    "https://www.linkedin.com/company/aeocanon",
    "https://www.wikidata.org/wiki/Q000000"
  ]
}

Where to go next

See how to implement structured data for AEO for the full workflow, and the JSON-LD glossary entry for a deeper definition.

Frequently asked questions

Which structured data format should I use?
JSON-LD. It sits in a self-contained script block separate from your HTML, is the easiest to add and maintain, and is the format Google explicitly recommends. Microdata and RDFa work but are inline and harder to keep clean.
What is the difference between JSON-LD and Microdata?
JSON-LD is a standalone script block of structured data, while Microdata is a set of attributes woven into your visible HTML tags. JSON-LD keeps markup separate from presentation; Microdata mixes them, which makes maintenance harder.
Do AI parsers prefer JSON-LD?
Yes, in practice. JSON-LD is a clean, self-contained block that is trivial to extract, and it is Google's recommended format. Inline formats like Microdata and RDFa are parseable but messier to read.

Related reading

The schema types with the highest AEO payoff are Organization and Person (entity clarity and sameAs) and LocalBusiness (local context) — Article, FAQPage, and HowTo help parsing and rich-result eligibility, and Product helps shopping. Rank types by entity value instead of marking up everything.

2 min read

Use FAQPage schema for question-and-answer content and HowTo for ordered, step-by-step tasks. Google deprecated HowTo rich results and limited FAQ rich results to government and health sites in 2023 — but the markup still gives AI parsers clean, structured data.

1 min read

A JSON-LD block has four load-bearing parts — @context sets the vocabulary (schema.org), @type declares what the thing is, @id gives it a stable identifier other nodes can reference, and the remaining properties describe it. Understanding each part lets you write and debug markup with confidence.

1 min read