SEO

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

By · · 3 min read

Short answerGoogle recommends JSON-LD when your site setup allows it, but says Microdata and RDFa are equally acceptable if the markup is valid. JSON-LD sits in a separate script tag, while the other two annotate visible HTML. Format matters less than accuracy.

Key takeaways

  • Google recommends JSON-LD if your setup allows it, but accepts Microdata and RDFa.
  • All three formats use the same schema.org vocabulary.
  • Markup must match what visitors can actually see on the page.
  • Valid structured data does not guarantee rich results.
  • Test with the Rich Results Test and monitor in Search Console.

Which structured data format should you use?

For most sites, JSON-LD. Google's structured data documentation says that, in general, it recommends JSON-LD "if your site's setup allows it." The same documentation also says all three supported formats (JSON-LD, Microdata and RDFa) are equally acceptable as long as the markup is valid and implemented correctly for the feature you want. So the choice is mostly about maintainability, not about a hidden ranking advantage.

What is the difference between the three formats?

According to Google's introduction to structured data, JSON-LD is embedded in a script tag, which keeps the markup separate from the visible text and makes nested data easier to express. Microdata and RDFa work differently: they use HTML tag attributes added to the content itself. Google notes that Microdata is typically placed in the body, while RDFa is common in both the head and the body.

FormatWhere it livesGoogle's note
JSON-LDScript tag, separate from visible textRecommended where setup allows
MicrodataAttributes on body HTML elementsAcceptable if valid
RDFaAttributes in head and bodyAcceptable if valid

Do the formats use different vocabularies?

No. Schema.org describes itself as a set of extensible schemas, and its getting-started guide says the vocabulary can be used with Microdata, RDFa or JSON-LD. The types and properties carry across formats, so an Organization or LocalBusiness description means the same thing whichever syntax carries it. JSON-LD itself is defined by the W3C as "a JSON-based format to serialize Linked Data," and JSON-LD 1.1 became a W3C Recommendation on 16 July 2020.

What rules apply no matter which format you pick?

Google's general structured data guidelines apply to all formats. In summary, they say:

Google also states that a structured data problem can trigger a manual action that removes eligibility for rich results, and that this does not change the page's ranking in web search.

Will structured data guarantee rich results?

No. Google's documentation says structured data "can enable" rich results and that they "might encourage" interaction. It also says that even correctly marked-up pages are not guaranteed to show rich results, because Google's systems choose the best result format for each search. Google cites case studies reporting higher click-through rates, but it does not promise any outcome, and this article does not claim one either.

How do you check your markup?

Google describes the Rich Results Test as an easy and useful tool for validating markup during development, and recommends using the Rich result status reports in Search Console after deployment. Google's guidelines also point to the URL Inspection tool for catching most technical errors. Pick the format your content management system or developers can maintain without errors, validate it, and keep it in sync with the visible page. A simple, accurate JSON-LD block that stays current is better than elaborate markup that drifts out of date.

Note: this article summarizes the documentation as published when fetched on 10 October 2026. Google can change its guidance, so check the linked sources for the latest wording.

Frequently asked questions

Is JSON-LD better for SEO than Microdata?

Google does not say JSON-LD ranks better. It recommends JSON-LD where your setup allows it, and says all three formats are equally acceptable when the markup is valid and correct for the feature.

Can I mix JSON-LD and Microdata on one site?

Google's documentation lists all three as supported formats, but the sources reviewed here do not give specific guidance on mixing them. Keeping one consistent format per page is easier to maintain and test.

Does structured data improve my rankings?

Google's documentation says structured data helps it understand content and can make a page eligible for rich results. Google's guidelines state that structured data manual actions do not change a page's ranking in web search.

How do I test my structured data?

Google recommends the Rich Results Test while developing and the Rich result status reports in Search Console after launch. The URL Inspection tool can also reveal technical errors.

Sources

  1. Intro to How Structured Data Markup Works — Google Search Central
  2. General Structured Data Guidelines — Google Search Central
  3. Getting Started with schema.org Using Microdata — schema.org
  4. JSON-LD 1.1: A JSON-based Serialization for Linked Data — W3C
KC
Kathy P. Carr

CEO of AIrecommend.ai and Skyview Business Consulting. Writes on answer engine optimization, franchising and building AI-first companies.

Connect on LinkedIn

Keep reading

Want to be the answer AI recommends?
See how AIrecommend.ai helps businesses get found and recommended by AI assistants.