What is Schema Markup?

Schema markup is structured data code that you add to your website to help search engines understand your content. It uses a standardised vocabulary from Schema.org and is typically written in JSON-LD format, a small block of code placed in your page's <head> tag.

When Google reads your schema, it can display rich results in search-enhanced listings that show star ratings, FAQ dropdowns, prices, cooking times, and more. These rich results take up more space on the page and attract significantly higher click-through rates than standard blue links.

💡
Why JSON-LD? Google recommends JSON-LD because it lives in a separate script tag; you never need to touch your visible page content. It's the easiest format to add, update, and maintain.

Step 1: Choose the Right Schema Type

The first step is picking the right schema type for your page. Different pages need different schema. Here's a quick reference:

Page typeSchema to useRich result
Blog post / articleArticle / BlogPostingAuthor byline, date
FAQ page or sectionFAQPageExpandable Q&A dropdowns
Product pageProductPrice, availability, ratings
Business homepageLocalBusinessMaps, knowledge panel
Recipe pageRecipeCook time, calories, ratings
How-to guideHowToStep-by-step panel
Review pageReviewStar ratings
Any page (navigation)BreadcrumbListNavigation path in URL
💡
Can I use multiple schema types on one page? Yes. A blog post can have both Article schema and BreadcrumbList schema. A product page can have Product schema and FAQ schema. Each schema block is independent.

Step 2: Generate Your JSON-LD Code

Writing JSON-LD by hand is error-prone and time-consuming. The easiest approach is to use a free generator, fill in a form, and get a valid code instantly.

Generate Schema in Seconds

Free JSON-LD generators for every schema type. No signup required.

Browse all tools →

Once you've generated your schema, copy the full output. It looks like this:

JSON-LD — Example FAQ Schema
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "What is schema markup?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Schema markup is code you add to your website to help search engines understand your content."
      }
    }
  ]
}
</script>

Step 3: Add the Code to Your Website

Now paste the JSON-LD into your page. The method depends on your platform:

For plain HTML websites, paste the JSON-LD code directly inside the <head> tag of your page before the closing </head> tag.

HTML — Where to paste
<html>
<head>
  <title>Your Page Title</title>
  <!-- Paste your schema here -->
  <script type="application/ld+json">
  { "@context": "https://schema.org" ... }
  </script>
</head>
<body>...

The schema code is invisible to visitors; it only exists for search engines. You can add multiple schema blocks in the same <head> tag.

There are two easy ways to add schema in WordPress:

  1. Using Rank Math (recommended): Install the free Rank Math SEO plugin → go to the page/post editor → find the "Schema" tab in Rank Math's sidebar → select your schema type and fill in the details. Rank Math generates the JSON-LD automatically.
  2. Using a custom code plugin: Install "Insert Headers and Footers" or "WPCode" → paste your JSON-LD into the header section → save. The code will be added to every page, or you can add it per-page.
  3. Using your theme's functions.php: Advanced users can add schema via wp_head() hook in functions.php. Only recommended if you're comfortable with PHP.

To add schema markup to a Shopify store:

  1. Go to your Shopify Admin → Online Store → Themes
  2. Click "Customize" next to your active theme
  3. Click "Edit code" (or go to Actions → Edit code)
  4. Open Layout → theme.liquid
  5. Find the closing </head> tag and paste your JSON-LD just before it
  6. Click Save
⚠️
Note: Adding schema to theme.liquid applies it to every page. For product-specific schema (with price and availability), use a product template file instead so the data is unique per product.

To add schema markup in Wix:

  1. Go to your Wix Dashboard → Settings → Advanced → Custom Code
  2. Click "+ Add Custom Code"
  3. Paste your JSON-LD schema code in the code box
  4. Set Place Code to "Head"
  5. Choose which pages to apply it to select specific pages for page-specific schema
  6. Click Apply and publish your site

Step 4: Validate Your Schema

Before you publish, always validate your schema. This catches errors before Google finds them and ensures you're eligible for rich results.

1
Go to Schemify Validator

Visit schemify.in/validator, Schemify's free built-in schema validator. No signup or external tools needed.

2
Paste your JSON-LD code

Copy your generated JSON-LD and paste it directly into the Schemify Validator. It instantly detects your schema type and checks for errors.

3
Review the results

The validator shows your schema type, highlights any errors or missing fields, and confirms whether your markup is valid. Fix any errors shown before publishing.

4
Publish & monitor in Search Console

Once validated, paste the code into your page's <head> tag and publish. Then check Google Search Console → Enhancements to monitor rich results. It typically takes a few days to a few weeks for rich results to appear.

Common Mistakes to Avoid

❌ Schema doesn't match page content
The data in your schema must exactly match what's visible on the page. Mismatches are a policy violation.
❌ Placing schema in body instead of head
JSON-LD should go inside your <head> tag. Placing it in <body> may work but is not recommended practice.
❌ Using the wrong schema type
Using Product schema on a blog post or FAQPage schema on a recipe sends incorrect signals. Always match schema type to page type.
❌ Never updating schema after changes
If your price, hours, or content changes, update your schema too. Stale schema data can cause validation errors and suppressed listings.
⚠️
Important: Schema markup is not a ranking factor; it does not directly boost your position in search results. What it does is make your listing more visually appealing and informative, which improves click-through rates. Don't add schema purely for ranking; add it because it genuinely describes your content.

Frequently Asked Questions

The easiest way is to use a free schema generator like Schemify, fill in a form, copy the JSON-LD output, and paste it into your page's head tag. No coding knowledge required. Schemify has free generators for every major schema type.
Paste the JSON-LD script tag inside the <head> tag of your HTML page, before the closing </head> tag. In WordPress, use a plugin like Rank Math or Insert Headers and Footers. In Shopify, use the theme code editor and add it to theme.liquid.
No, schema markup does not directly improve rankings. What it does is enable rich results which significantly improve click-through rates. Higher CTR sends positive signals to Google and can indirectly support better rankings over time. The primary benefit is more visible, more informative search listings.
Use Schemify Validator; paste your JSON-LD code, and it instantly checks for errors, identifies your schema type, and confirms whether your markup is valid. Once published, you can also monitor rich results in Google Search Console under the Enhancements section.
Yes, you can have multiple JSON-LD blocks in your page's head tag, each describing different aspects of the page. For example, a blog post can have both article schema and breadcrumb list schema. Each block should be a separate <script type="application/ld+json"> tag.
After adding valid schema and publishing your page, it typically takes a few days to a few weeks for Google to crawl, process, and display rich results. You can speed this up by requesting indexing via Google Search Console's URL Inspection tool. Check the Enhancements section in Search Console to monitor progress.

Free Schema Generators

Use these free tools to generate valid JSON-LD for any content type: