Schema markup is structured data code that tells search engines exactly what a page contains, such as an article or product. The easiest format is JSON-LD: a block of JSON inside a <script type="application/ld+json"> tag, using the schema.org vocabulary. Valid schema code can make a page eligible for rich results, but never guarantees them.
Visitors never see it. Search engines and other machines read it. This guide explains the code line by line, shows where to put it, and is honest about which rich results Google still shows, so you spend your time on markup that actually does something.
Try it: Schema Markup GeneratorCreate JSON-LD structured data for FAQ, Article, Product, LocalBusiness, Organization, Person, Event, Breadcrumbs and How-to pages.
Open tool — freeWhat is schema code?
Schema code is markup written with the schema.org vocabulary, a shared set of types and properties that the major search engines agreed on. Types describe what a thing is (Article, Product, LocalBusiness), and properties describe it (headline, price, address).
There are three ways to write it: Microdata and RDFa, which are attributes woven through your HTML, and JSON-LD, which sits in one self-contained block. Use JSON-LD. Google recommends it, and it’s the only format you can add or change without editing the visible page.
How JSON-LD schema markup works
Here’s a complete, copy-ready block for a blog post. Replace the values with your own page’s details.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "How to Clean a Cast Iron Pan",
"description": "A simple routine for cleaning and re-seasoning cast iron.",
"image": "https://example.com/images/cast-iron.jpg",
"datePublished": "2026-03-02",
"dateModified": "2026-05-10",
"author": {
"@type": "Person",
"name": "Jordan Lee",
"url": "https://example.com/about/jordan-lee"
},
"publisher": {
"@type": "Organization",
"name": "Example Kitchen",
"logo": {
"@type": "ImageObject",
"url": "https://example.com/logo.png"
}
}
}
</script>Reading the schema markup JSON line by line
| Part | What it means |
|---|---|
<script type="application/ld+json"> | Tells the browser this is data, not code to run, and tells crawlers it’s JSON-LD |
"@context" | Says the vocabulary is schema.org. Always https://schema.org |
"@type" | What the thing is. Must match a real schema.org type, spelled exactly |
"headline", "image", dates | Properties of that type. Dates use ISO 8601, such as 2026-03-02 |
"author": { "@type": "Person" } | A nested object: one thing (a person) described inside another (the article) |
The syntax rules are plain JSON: double quotes around every key and string, commas between items but never after the last one, and matching braces. One stray comma breaks the whole block, and nothing on the page tells you. Paste hand-edited blocks into a JSON validator, or test them before publishing, to catch these slips early.
Which schema types do most sites need?
Most sites only ever need a handful of types. Pick the most specific one that’s accurate; LocalBusiness, for example, has subtypes such as Restaurant, Dentist and Plumber.
| Type | Use it for | Key properties |
|---|---|---|
| Organization | Homepage or about page | name, url, logo, sameAs |
| Article / BlogPosting | Posts, news, guides | headline, author, datePublished, image |
| Product | A single product page | name, image, offers (price, priceCurrency, availability) |
| LocalBusiness | Shops, restaurants, clinics, trades | name, address, telephone, openingHoursSpecification |
| BreadcrumbList | Pages inside a site hierarchy | itemListElement with position, name, item |
For full copy-ready blocks of each type, including Product, LocalBusiness, BreadcrumbList and FAQPage, see our collection of JSON-LD schema examples.
Do FAQ and HowTo schema still get rich results?
Mostly no. Since 2023, Google shows FAQ rich results only for well-known, authoritative government and health websites, and it has discontinued HowTo rich results entirely. Both remain valid schema.org vocabulary, so the markup isn’t an error, but don’t add it to an ordinary site expecting expandable questions or steps under your listing.
Google has retired other rich result types since then too, and it adjusts eligibility over time. Treat any list of “schema that gets rich results” as a snapshot and check the current feature list in Google Search Central’s structured data documentation before investing in a type.
Even for supported types, valid markup only makes a page eligible. Google still decides query by query, and plenty of pages with perfect markup get a plain listing.
How to add and test schema markup
You can hand-write JSON-LD, but our free schema markup generator builds it from a form so the syntax is always valid.
- Choose the type that matches the page, for example Article or LocalBusiness.
- Fill in the fields using exactly the information visible on the page. Leave optional fields empty rather than guessing.
- Copy the generated block, including the opening and closing script tags.
- Paste it into the page’s head or body. In WordPress, many SEO plugins have a custom schema field, or a header code snippet plugin works for single pages.
- Run the live URL through Google’s Rich Results Test to see which rich results it’s eligible for, plus any errors or warnings.
- Use the Schema Markup Validator at validator.schema.org for general checks beyond Google’s features.
- After publishing, watch the enhancement reports in Google Search Console for problems across the site.
Fix errors, because they usually make the markup unusable. Warnings flag missing recommended properties: fill them in if you honestly have the information, and ignore them if you don’t.
Rules and beginner mistakes to avoid
- Mark up only what’s visible. Prices, ratings, hours and questions in the schema must appear on the page too.
- No made-up reviews. Add
aggregateRatingonly for genuine customer reviews shown on the page. Google can apply a manual action for misleading structured data. - Keep it current. A product marked
InStockthat’s sold out erodes trust. - Avoid duplicates. A plugin that adds schema automatically plus your own pasted block often produces two conflicting Organization entries.
- Use absolute URLs. Write
https://example.com/logo.png, not/logo.png. - Be patient. Google has to recrawl the page before anything changes, which can take days or weeks.
Schema vs meta tags
Meta tags (title, description, Open Graph) control how a page is presented in search results and social shares. Schema describes what the page is. You want both, and they shouldn’t contradict each other. Generate the presentation side with the meta and Open Graph generator, and see our guide to title and meta description length for the wording.
Where to start this week
Add Organization markup to your homepage and Article markup to your posts, then Product or LocalBusiness where it truly applies. Generate each block with the schema generator, test it in the Rich Results Test, and keep the data honest. Rich results are a possible bonus; clean structured data helps machines understand your site either way.
Frequently asked questions
Does schema markup improve my Google rankings?
Not directly. Structured data helps search engines understand your page and can make it eligible for rich results, but Google does not treat it as a ranking boost on its own.
Where do I put JSON-LD on my page?
Inside a script tag with the type application/ld+json, in either the head or the body of the page. Google reads it in both places, and most CMS plugins add it to the head.
Why is my valid schema not showing rich results?
Valid markup only makes a page eligible. Google decides per query whether to show a rich result, based on page quality and its current rules, and some types such as HowTo no longer produce rich results at all.
Is JSON-LD better than Microdata?
For most sites, yes. Google supports all three formats, but it recommends JSON-LD because the markup sits in one block that is easy to add, read and update without touching your visible HTML.



