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

The Three Structured Data Formats

If you've read how to add schema markup, you know structured data describes what your page *is* so search engines can understand and enhance it. What that guide takes for granted — and this one explains — is the choice underneath: the same schema.org vocabulary can be written in three different formats: JSON-LD, Microdata, and RDFa.

FormatHow it worksGoogle's stance
JSON-LDA standalone <script> block of JSON, separate from your HTMLRecommended
Microdataitemscope/itemprop attributes woven into your HTML tagsSupported
RDFaSimilar attribute approach, from the semantic-web worldSupported

The three ways to write the same schema.org markup.

JSON-LD: The One Google Recommends

JSON-LD (JavaScript Object Notation for Linked Data) lives in a single `<script type="application/ld+json">` block — usually in the page `<head>` — completely separate from the visible markup. That separation is the whole advantage:

  • It survives redesigns. Change your HTML and CSS all you like — the schema block is untouched.
  • It's readable and debuggable. One block holds the entire description; you can see and validate it at a glance.
  • It's easy to generate. Tools and CMS plugins can inject it without touching your templates — our free schema generator outputs paste-ready JSON-LD for exactly this reason.
  • Google recommends it. Google's own documentation names JSON-LD the preferred format, and new rich-result features are documented JSON-LD-first.

Microdata: Inline, and Brittle

Microdata takes the opposite approach: you annotate the visible HTML itself with `itemscope`, `itemtype`, and `itemprop` attributes. The data and the presentation are the same elements. That sounds elegant — the markup can't contradict the visible content — but in practice it's the format's weakness:

  • Redesigns break it silently. Restructure a template and half your `itemprop`s disappear with it — nothing errors, your rich results just fade away.
  • It's scattered. The description of one entity is spread across dozens of tags, which makes auditing painful.
  • Partial markup is easy. It's common to mark up half the required properties and not notice until the Rich Results Test complains.

When does Microdata still make sense? Mostly when a legacy CMS or theme already emits it correctly — working Microdata is not worth ripping out, since Google reads it fine. Just don't *start* a new project with it, and avoid mixing formats for the same entity on one page (it confuses validation and risks conflicting values).

Does the Choice Affect Rankings?

No. The format is plumbing, not a ranking signal — Google extracts the same entities from JSON-LD, Microdata, and RDFa, and structured data itself mainly affects eligibility for rich results, not position. Schema is part of technical SEO: it has to be present and correct, and beyond that the gains come from your content, not your serialisation format.

Generate it instead of hand-writing it

Whichever page you're marking up, the fastest path is generating clean JSON-LD: our free schema markup generator builds FAQ, Article, and Breadcrumb blocks you can paste straight into your head.

Frequently asked questions

Should I use JSON-LD or Microdata for schema markup?

Use JSON-LD. It's the format Google explicitly recommends: it lives in a separate script block, survives HTML redesigns, is easier to read and validate, and new rich-result features are documented JSON-LD-first. Microdata works and is still supported, but it's brittle because it's woven into your visible HTML.

Does Google still support Microdata?

Yes. Google reads JSON-LD, Microdata, and RDFa, and existing correct Microdata keeps working — there's no need to rip out a legacy implementation that validates. But for anything new, Google's documentation recommends JSON-LD.

Does the structured data format affect SEO rankings?

No. All three formats express the same schema.org vocabulary, and Google extracts the same information from each. Structured data mainly affects eligibility for rich results rather than rankings — so pick the format that's easiest to keep correct over time, which is JSON-LD.

Can I mix JSON-LD and Microdata on the same page?

Avoid describing the same entity in two formats — conflicting or duplicated values confuse validation and can undermine rich-result eligibility. Mixing is technically allowed for different entities, but the cleaner pattern is one format (JSON-LD) for everything you add.

Stop starting from a blank page.

Type a seed keyword and RibatAI generates a clustered, internally linked content plan in seconds.

Plan your first cluster free