JSON-LD or Microdata - Which schema format is better for ranking

JSON-LD or Microdata - which schema format is better for SEO and ranking on Google search? Learn the pros and cons of both approaches to represent the structured data on webpages.

JSON-LD and Microdata are two popular methods for Schema implementation to get better visibility on search engines. Modern search engines can show rich snippets on the search results that give additional information about your website. In order to decide what to show in the rich snippets, they depend on the structured data on the pages to a large extend.

The terms "Schema" and "Structured Data" are used interchangeably in this article. While "Schema" is a generic term that represents the industry standard to represent data objects on the web, the later is a term mostly used by web developers to represent the data that appears on search results in the form of rich results. Schema definitions are used to build structured data. Both represent more or less the same in the context of this article. Read more about Schema at www.schema.org and introduction to structured data.

Common types of Schema

Some of the common Schema types used in various websites include:

  1. Organization - this represents the organisation behind the website/business

  2. FAQPage - this Schema represents a set of Questions and Answers that gives more clarity on the information provided in the page.

  3. QAPage - The QAPage is very similar to the FAQPage but the primary difference is, the QAPage Schema allows multiple answers for each question. Typically, QAPage represents a discussion forum or question-answer forum where public users can contribute answers to a question. You can read more about the difference between QAPage and FAQPage at this page.

  4. Article - The article object is used to represent a blog or journal or article.

  5. Hotel - This object is used commonly on the hotel websites to indicate to search engines that the entity mentioned in the page represents a Hotel.

There are several other Schema types that can be added to the websites. Depending on the nature of your website, you can choose the right Schema types. As a leading digital marketing company, we have been helping websites follow the best industry practices.

All SEO experts would agree that Structured Data can help in significantly improving the organic ranking and traffic generation for the websites, provided they have implemented it right.

Structured Data Formats

Search engines like Google recognise structured data in the following formats:

  1. JSON-LD

  2. Microdata

  3.  RDFa

In JSON-LD format, the data objects are embedded in the website in the form of a script, typically placed in <script> tag. In this approach, the data is separated from the main body of the page and thus is easier to read and understand by looking at the source of the page. it is cleanly separated from the HTML.

In Microdata format, the structured data is represented in the page by adding additional HTML attributes to the content already on the page.

RDFa is similar to Microdata but it uses an HTML 5 extension to add attributes to the text to represent structured data. RDFa can be placed in the <head> or <body> of the page.

Each of the formats has its own merits and demerits.

Now, let's come to the point - which to choose?

JSON-LD or Microdata - Which is more effective?

Developers are often confused about which structured data format to choose from. Technically, they are just different implementations that achieve the same purpose in different ways. However, there are a few reasons why one could be better than the other in different scenarios.

Reasons to choose JSON-LD over Microdata

1. Google prefers JSON-LD over Microdata

Google has made it clear in a few places that it prefers JSON-LD format over Microdata and RDFa. There is no explanation given in the official documentation on why it prefers one over the other but as of now, we have to go by what has been told to us.

structured data formats

If you want to go by the above official statements, then go for JSON-LD format. If you like to go for the easiest implementation, then you can ignore this and choose a format depending on other parameters mentioned below.

NOTE: Even though some official sources have said JSON-LD is it's the preferred method, all my research and experiments so far shows there is no difference when it comes to search engine ranking. This page itself is a case study. We have used Microdata to implement FAQPage schema and it appears as a rich snippet on SERP. You can read more about it towards the end of this article.

2. Google can read dynamically injected JSON-LD

Does your website dynamically load content using Javascript or other scripting technologies? In such cases, JSON-LD will be the right approach. Google can read dynamically loaded scripts and recognise the schema in it. However, if you do the same with Microdata, Google may not recognise the schema in the dynamically pulled HTML content.

3. Use Tag Manager to organise JSON-LD scripts

Here is another reason to choose JSON format. You can use Tag Manager or similar platforms to organise your JSON script.  The Tag Manager is widely used by webmasters to manage scripts on their websites. You can add, modify or remove scripts on any web pages through the Tag Manager dashboard and don't need to modify the pages or even log in to the admin pages to make these changes. If you are planning to use JSON for structured data, you can add or modify them anytime on the Tag Manager without messing up the page content. With Tag Manager, you can handle this with minimal technical or programming knowledge. Also, your SEO team can work independently from the developers.

Reasons to choose Microdata over JSON-LD

Here are some reasons to choose Microdata over JSON-LD.

1. No need to repeat the data objects

As I said earlier, when using JSON format, you need to repeat the structured data in 2 places - one in the form of JSON-LD and another in the form of HTML for your readers.  You can't choose to use it only as JSON and hide it from your readers. Google requires that all (most) structured data used in the website should be visible to the visitors. So, when you use the JSON format, you are required to show the same data in the form of HTML as well, leading to extra content on your website.

This won't be a problem for small pieces of JSON script. However, if you want to represent large objects like Article, FAQPage, QAPage etc, almost the entire content of the page needs to be represented in the schema and repeating the same in the form of JSON and HTML will almost double the size of your page and may affect your site's loading speed.

2. Manage in one place

If you use JSON-LD, you have the same data in 2 places and when you make a change, you need to remember to change in 2 places. If you forget to change in one of these, you will end up inconsistent data and may even end up in violation of Google rules regarding structured data implementation.

My personal choice is Microdata for the 2 reasons mentioned above. I have been using this format in many websites and so far, it works perfectly fine.

A Case Study - Microdata works as good as JSON-LD

This article is our case study to show that Microdata works as good as JSON-LD format. Search for "JSON-ld or Microdata which schema format is better" and you will see this article appearing on the first page of Google along with the FAQ used below in this page.

See the screenshot below:

json-ld vs microdata

So, this case study shows that Microdata format will work as good as JSON format when it comes to ranking on Google and showing rich snippets in the search results.

How to verify your schema implementation and make sure it is working correctly

Once you implement the schema on your pages, using either one of the formats, you need to make sure it is done correctly. Considering the complexity of the implementation, there are good chances of error.

You can follow the steps below to test and verify your implementation:

  1. Test your page using Google structured data testing tool. This is a pretty straightforward tool. Just provide the URL of your publicly accessible page and the tool will show all structured data it could identify from the page. If your implementation is not shown here or if it is shown with errors, you will need to fix them.

  2. After implementation, submit the URL to Google through Search Console so that Google will crawl and index your schema implementation.

  3. Give it some time (typically a few minutes but sometimes days or even weeks) for Google to parse and analyse your schema and index your page. Once Google recognises it, it will show up on your Search Console, under the "Enhancements" section. If you don't see it on the next day, don't worry. It may take several days to show the schema results on your Search Console

  4. Watch search results and see if Google shows rich snippets from your schema. Keep in mind that Google doesn't guarantee that the structured data will be shown as rich snippet in search results. It depends on several factors including the credibility and ranking of your website.

Frequently Asked Questions

Microdata or JSON-LD which is better for SEO?
Even though Google has mentioned JSON format is the preferred format, practically both formats should work equally well on an SEO perspective.

Which is easier to implement - JSON or Microdata?
It depends on several parameters like your platform of development, type of the schema etc. If the length of the Schema data is low, then JSON may be better.

JSON or Microdata which is better for FAQPage schema?
In case of FAQPage, a lot of text needs to be used. If you use JSON format, the same text needs to be repeated in the HTML as well as JSON script. To avoid this extra content, Microdata may be the better approach for FAQPage Schema.

Which Schema format is faster for loading?
For loading purpose, the length of the content matters a lot. If the Schema involves a lot of text, JSON format will require repetition of the content and thus make it slower a bit compared to Microdata.

I am using JSON format and my structured data is not shown in Google search. Should I change to Microdata?
Google doesn't show all structured data as rich snippets on search results. Just by changing from one format to another, that scenario will not change.  You probably have to wait for Google to start showing your content as rich snippet and changing format will not make a difference.


So, let me conclude this. Even though some search engines prefer JSON-LD format, I would say it is just because that is an easier format for its algorithm to read and process. In case of Microdata format, the engine needs to put some extra efforts to parse them, making it a bit tougher for it.

Irrespective of the efforts required for processing, when it comes to ranking and showcasing as rich snippets, the format used makes no difference. All supported structured data formats work equally well.


Here are some additional references for more reading:
  1. Discussion on Stackoverflow - https://stackoverflow.com/questions/38091635/microdata-or-json-ld-im-confused
  2. Article in Search Engine Journal - https://www.searchenginejournal.com/google-structured-data-preference/297479/
  3. Schema markup best practices guide - https://www.envigo.co.in/blog/seo/schema-markup-best-practices-json-ld-vs-microdata
  4. SEO for webmasters - JSON or Microdata - https://dev.to/tonyfrenzy/seo-for-web-developers-to-use-json-ld-or-microdata-2d4p
  5. A comprehensive guide to Schema usage - https://builtvisible.com/micro-data-schema-org-guide-generating-rich-snippets/

Do you have reasons to disagree with me? Share your comments below and I will be happy to review your points.

Article by Tony John
Tony John is a professional blogger from India, who started his first Weblog in 1998 at Tripod.com. Tony switched to blogging as a passion blended business in the year 2000 and currently operates several popular web properties including IndiaStudyChannel.com, Techulator.com, dotnetspider.com and many more.

Follow Tony John or read 702 articles authored by Tony John


Guest Author: Grigor28 May 2020

Most of the websites I have seen on the internet are using the JSON format for structured data. Is it because WordPress has built-in support for this format? Or, is it because Google prefers that approach? I am planning to incorporate schema for my website and like to get some clarifications before I proceed with the development.

Please give your suggestions.

Author: Tony John28 May 2020 Member Level: Gold   Points : 0

Grigor, as I mentioned in the article, I don't believe Google's algorithm has any preferences. You can go by either of the methods and both will work fine. Give it a try and let me know how it goes.

Author: Umesh13 Jun 2020 Member Level: Gold   Points : 6

This is one exhaustive article on the options available to make one's work to be ranked by search engines at a higher step in the search engine results. Using structured data format in one's write ups makes sense as the different and discreet elements could be sensed by the search engine using the proprietary algorithm methods but if it helps to bring the work in prominence then it is definitely a method to adopt in our writings especially the long articles where a lot of data is to be presented in structured form. Some sites are already providing capsules for entering different parts of an article or write ups to create that feeling in the mind of the author that each capsule is a different element and has to contain the relevant material related to the capsule as other material would go to the other respective capsules. Anyway, new methods are being invented and devised by the experts to improve SEO ranking that is the crucial factor for traffic enhancement and any such method which helps in it is welcome.