Skip to content
Structured Data 1 min read

Should I use JSON-LD or microdata for my hotel?

Short answer

For most hotel websites, JSON-LD is the better choice. Google supports JSON-LD, microdata, and RDFa equally as long as the markup is valid, but recommends using the format that's easiest to implement and maintain — in most cases JSON-LD. Because it sits in a separate script block rather than being woven into your HTML, it's simpler to generate from your property data, update, and debug. Microdata is fine if your platform already produces it correctly. The real risk is mixing formats that describe your hotel with different details.

By Lodging Engine Editorial Team· Reviewed by Eric Zwanenburg· Last reviewed

The three formats

FormatHow it worksNotes
JSON-LDA <script type="application/ld+json"> blockSeparate from visible HTML; easy to generate and maintain
MicrodataAttributes added to HTML elementsTied to page markup; harder to maintain through redesigns
RDFaAttributes added to HTML elementsSimilar trade-offs to microdata

Google states all three are equally fine for Google when valid and correctly implemented, and recommends the easiest to maintain — usually JSON-LD.

Why JSON-LD suits hotels

  • Generated from the same data as your property page (address, phone, times).
  • Doesn't break when designers change HTML.
  • Easy to inspect and test.
  • Google can also process JSON-LD injected with JavaScript, though server-rendered markup is easier to debug.

When microdata is fine

  • Your website platform already outputs valid microdata that matches your visible content.
  • You don't plan major template changes.

Avoid mixed, conflicting markup

A theme outputting microdata and a plugin outputting JSON-LD can describe the same hotel with different values. Pick one source. See common structured data errors.

Common mistakes

  • Two formats with different phone numbers.
  • Microdata lost in a redesign without anyone noticing.
  • JSON-LD that doesn't match visible content.

Checklist

  • One markup source for the property
  • JSON-LD preferred for new implementations
  • Values match visible content
  • Tested after template changes

Sources

  1. Introduction to structured data markup in Google Search — Google Search Central
  2. General structured data guidelines — Google Search Central
  3. Understand JavaScript SEO basics — Google Search Central