Worsoo
A cedar shelf holds HTML angle brackets and JSON braces beneath the title “Microdata vs JSON-LD.

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

By Worsoo Digital Agency · Last updated December 2, 2026

For most new pages, choose JSON-LD. If your site already uses Microdata and it describes the page correctly, keep it unless a change would make the markup easier to maintain.

The practical difference in Microdata vs JSON-LD is where the facts live. Microdata labels parts of your HTML. JSON-LD puts the same facts in a separate script. Both can describe a product, article, or business. This guide uses one shelf, two code samples, and a simple edit test to help you choose the right format for your site.

Key takeaways

  • Google recommends JSON-LD for most new setups and also supports Microdata.
  • A working Microdata template can remain a good choice when the visible page and its labels change together.
  • JSON-LD works well when a plugin or template generates it from the same fields visitors see.
  • Before switching formats, save the current values. After the switch, change one field and check whether the public page and its markup update together.

Microdata vs JSON-LD: What actually changes?

The format changes how you label a fact. The fact itself stays the same. A shelf with model number CS-24 should have that model number in either format. With Microdata, a label sits on the HTML element containing CS-24. With JSON-LD, a script contains a named field and its value.

Think of Schema.org as a shared set of names for things. Product describes a product, material identifies what it is made of, and sku holds the seller’s stock code. Microdata and JSON-LD are two ways to put those names on a page. Worsoo’s guide to schema markup explains how the vocabulary works.

Question Microdata JSON-LD
Where do the labels live? On HTML elements, often around text visitors can see. In a script that can sit in the page head or body.
What identifies the item? itemscope starts an item, and itemtype names its type. @type identifies the item inside the script.
How do you label a value? Add an attribute such as itemprop="sku" to the relevant element. Add a property such as "sku": "CS-24".
What can go wrong after an edit? A layout change can remove a label while leaving the text visible. A separately maintained script can keep an old value after the page changes.
When is it a good fit? A stable template already has accurate labels that are easy to maintain. A new site, a shared template, or a plugin can generate the script from current content.

Google lists JSON-LD, Microdata, and RDFa as supported formats. It recommends JSON-LD in most cases because it is generally easier to implement and maintain. For the full comparison, see Google’s <a href=”https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data” target=”_blank” rel=”noopener”><strong>guide to structured data formats</strong></a>. developers.google.com

What does the same product look like in both formats?

The two examples below describe one fictional product, a Cedar Wall Shelf. Each gives the shelf the same name, stock code, and material. These short samples make it easy to compare the formats field by field. A store seeking a specific product search feature would also need to check that feature’s requirements.

Microdata example

<section itemscope itemtype="https://schema.org/Product">
  <h2 itemprop="name">Cedar Wall Shelf</h2>
  <p>Model: <span itemprop="sku">CS-24</span></p>
  <p>Material: <span itemprop="material">Western red cedar</span></p>
</section>

A visitor sees a heading and two product details. The itemprop attributes tell a tool what each value means. Notice where the SKU label sits. It wraps only CS-24, so the field contains the code itself. Putting the label on the whole paragraph would also pick up the word “Model.”

That placement matters when a designer rebuilds a product card. Moving the model number into a new element can leave its label behind. The <a href=”https://html.spec.whatwg.org/multipage/microdata.html” target=”_blank” rel=”noopener”><strong>HTML Microdata specification</strong></a> defines how a tool obtains a property’s value from its element. html.spec.whatwg.org

JSON-LD example

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Cedar Wall Shelf",
  "sku": "CS-24",
  "material": "Western red cedar"
}
</script>

Microdata labels the shelf’s SKU CS-24 in HTML. JSON-LD stores CS-24 in a script.

With JSON-LD, the three values sit together. The script does not create a visible product description. Your template still needs to display the shelf’s name and details for shoppers. Ideally, the page and the script read from the same product record, so an editor enters each fact once.

What happened when we checked the examples? We compared the three labeled HTML values with the three values in the JSON object. All matched. We then removed only itemprop="sku" from the HTML. The text CS-24 was still on the page, but our field check found only the name and material. That small test shows why a visual review can miss a Microdata regression.

Which format makes sense for your website?

Choose the format your publishing system can keep accurate through an ordinary edit. For a new WordPress site with a plugin that reads your content fields, JSON-LD is usually the simpler choice. For an older store with accurate Microdata built into its product template, keeping it may save work and preserve useful details.

For a new WordPress blog: Check what your SEO plugin already outputs on one published post. If it produces an accurate article record using the headline, author, and dates from WordPress, let it handle those fields. Pasting a second script into every post gives editors another copy to maintain.

For an established store: Pick a product with a distinctive model number. Check whether the existing Microdata identifies the correct product, model, and offer. Then ask how the store updates those values. If one catalog edit already updates both the page and its labels, switching formats may solve little.

For a site about to be redesigned: Find out who owns the product facts and who owns the layout. If a design team regularly replaces HTML components while a catalog team maintains stable product fields, generating JSON-LD from the catalog can reduce the number of labels designers must carry forward.

For a small site with hand-written pages: Consider the next person who will change a price or address. If they edit only the visible text, a separate hand-written script is easy to forget. A shared field that feeds both places is worth more than a change of format alone.

How do you compare the formats before making a sitewide change?

Run one edit test on a private copy of a representative page. Save the starting values, change one real content field, and check what each output now says. This tells you whether the format fits your workflow and whether the implementation reads from the right source.

  1. Choose a page that represents the template. For a store, use a product with a name, SKU, and material. If other products lack a SKU, include one of those pages before rolling out a change.
  2. Write down the starting facts. In the shelf example, record Cedar Wall Shelf, CS-24, and Western red cedar. Save the public URL and note where an editor changes each field.
  3. Inspect the existing markup. Look for itemscope and itemprop in the HTML and application/ld+json in script tags. Expand the relevant record. A page can contain article, product, and navigation data at the same time.
  4. Change one field on the test site. For example, change the test shelf’s stock code from CS-24 to CS-24B. Use the same product editor your team uses in daily work. Editing the script directly would skip the part you want to test.
  5. Compare the visible value with the labeled value. Both should now say CS-24B. If the page changes but the script keeps CS-24, the script may contain a hard-coded value. If the page changes but the Microdata field disappears, inspect the element that displays the code.
  6. Check a second product and restore the test value. The second page should retain its own stock code. This catches a shared template that accidentally writes the first product’s value on every page.
    The product editor, visible page, and structured data all show the updated SKU CS-24B.

For a redesign handoff, use Worsoo’s SEO audit template to record the old value, the edited value, and the result. A developer can act on “Changing the SKU in the product editor updates the heading area but leaves the script unchanged.”

How do you switch from Microdata to JSON-LD safely?

Move one template at a time. First capture the facts your current markup supplies. Then generate the JSON-LD from the same content fields, compare the results, and remove the overlapping Microdata after you confirm the replacement covers the intended item. Test the published template again after the change.

The easiest detail to lose is often one that nobody remembers adding. For example, an older theme might label a manufacturer part number beside the price. A new plugin might supply the product name and SKU but leave out that part number. Comparing the two records field by field catches the omission before rollout.

Also check what each old label describes. A product page might use Microdata for both a product and a breadcrumb trail. Replacing the product record gives you a reason to remove its old labels. The breadcrumb trail still has its own purpose.

Migration checklist

  • Save one complete record from each template you plan to change.
  • Match the item type and each useful field to its source in the content system.
  • If the existing record uses a stable identifier, check whether other records refer to it.
  • Compare regular pages with an unusual case, such as a product with an empty optional field.
  • Confirm that a price, title, or availability change reaches the new script.
  • Remove the overlapping output and repeat the test on the public URL.

How do you test Microdata and JSON-LD on a live page?

Start with the public URL and check the specific record you intended to publish. A general schema validator helps you inspect the item and its properties. Google’s test answers a narrower question about supported search features. You get a more useful answer when you read the actual field values in each result.

Open the <a href=”https://validator.schema.org/” target=”_blank” rel=”noopener”><strong>Schema Markup Validator</strong></a> and enter the published URL. In the shelf example, expand Product and look for sku. Seeing CS-24 under the right product tells you more than a message that the tool found an item. validator.schema.org

Next, run the URL through Google’s <a href=”https://search.google.com/test/rich-results” target=”_blank” rel=”noopener”><strong>Rich Results Test</strong></a> if the page targets a supported feature. Open the reported item and review its details. Passing a code sample checks that sample. Testing the URL checks what your published page delivers. search.google.com

If the tools give different results, keep the public URL and expected item type handy. Worsoo’s schema markup detection guide shows how to trace one value from the original page source to the rendered HTML.

Frequently asked questions

Is JSON-LD better than Microdata for SEO?

JSON-LD is usually easier to maintain on a new site, and Google recommends it for most implementations. Accurate Microdata is also supported. If you’re choosing between them, check which option keeps the live page and its structured facts in sync when an editor changes a title, price, or address.

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

Yes. A page can use one format for breadcrumbs and another for a product. Check what each record describes. If both formats describe the same product, compare their prices, stock codes, and availability. Two separate sources for the same facts can drift apart after the next update.

Does JSON-LD have to go in the page head?

Google can read JSON-LD in the head or body of the HTML. Choose a location your publishing system can manage reliably. On WordPress, inspect the published output after adding it. A Code block that displays an example for readers serves a different purpose from a JSON-LD script.

Should I convert old Microdata during a redesign?

A redesign is a good time to review Microdata because new templates can drop HTML attributes. Save the old records before replacing the layout. Convert them if the new system can generate accurate JSON-LD from your content fields. Otherwise, carry the working labels forward and test them.

What if my validator passes but the product price is wrong?

A tool can read a valid number without knowing what your store charges. Compare the reported offer with the visible price for the same product, option, seller, and currency. Then trace the wrong value to its source. Changing formats alone will carry the error into the new record.

Which format should you choose today?

For a new site, start with JSON-LD generated from the fields your editors already use. Keep reliable Microdata when it stays accurate through content and layout changes. The best Microdata vs JSON-LD test is simple: change one fact on a test page, then check whether readers and search tools receive the same update.

If you’re planning a redesign or seeing conflicting product details, contact Worsoo for a structured data review. Send one representative URL and the field you’re concerned about. That gives our team a clear starting point for deciding what to keep, repair, or migrate.

Leave a Reply

Your email address will not be published. Required fields are marked *