What are schema markup and JSON-LD?
Schema is short for the schema.org vocabulary. Google, Microsoft and Yahoo launched it in 2011, and Yandex joined the same year. Its purpose is to label the information on a page so that machines can read it without guessing: it states plainly whether a piece of text is a product name, a price, an author or an opening time.
JSON-LD is one way to add those labels to a page. The data is not scattered through the visible HTML; it sits in a single script block. That means you can add it without touching the design, it is easy to maintain, and Google recommends this format whenever possible. Microdata and RDFa are still supported, but JSON-LD is the more practical choice for new projects.
What structured data does and does not do
Correct markup makes a page eligible for rich results: price and stock on a product listing, an image and date on an article, a breadcrumb trail above the result. Eligible does not mean shown; Google decides when a rich result appears. Google representatives have also said that structured data gives no direct ranking advantage.
The second benefit is meaning. When your business name, address, social profiles and areas of expertise sit in one consistent record, search engines and AI-powered answer tools can recognise you without confusing you with similarly named organisations. That is why schema is one of the basic steps of GEO (Generative Engine Optimization). Most AI crawlers do not execute JavaScript, so it matters that the code is present in the HTML your server sends.
- Only mark up information that is actually visible on the page; adding questions, prices or reviews that are not on the page goes against Google's guidelines.
- Take ratings and review counts only from genuine customer reviews; ratings collected from other websites should not be used.
- Since 2023 Google shows FAQ rich results only for well-known government and health websites, and it retired the sitelinks search box in 2024.
- Update the code whenever prices, stock status or opening hours change.
Which schema for which page?
A page can carry more than one schema. What matters is that each one describes the main subject of that page and that the same facts are written the same way across the whole site.
- Organization: the home page or About page; logo, contact details and official social profiles.
- LocalBusiness: businesses with a physical address; address, map location and opening hours, matching your Google Business Profile.
- WebSite: the home page; it helps Google show your site name correctly.
- Article and BlogPosting: blog posts and news; headline, author, publish date and update date.
- Product: pages about a single product; price, currency and stock status.
- BreadcrumbList: any page within a category structure. FAQPage: pages with a visible question-and-answer section. Person: author and expert profiles.
Adding the code to your page and validating it
Paste the generated code into the head of the page or anywhere inside the body; Google reads both locations. Website builders usually offer a custom code or head code field. In your own software, the code goes into the template of the relevant page.
Before publishing, use Google's Rich Results Test to see which rich results the page is eligible for, and the Schema Markup Validator to check the syntax. After publishing, the enhancement reports in Search Console list errors and warnings page by page.
This tool builds the code entirely in your browser. Any less-than sign in your values is written as an escape sequence, so an HTML tag typed into a field by mistake cannot close the script block and the code is safe to paste.