JSON-LD
JSON-LD (JavaScript Object Notation for Linked Data) is a format for adding structured data to a web page in a single script block. It describes things like your organisation, products, articles or events in a way machines can read, and it is the format Google recommends.
How JSON-LD works
JSON-LD sits inside a <script type="application/ld+json"> tag, usually in the page head, although it can go in the body. It is separate from the visible HTML, so you do not need to wrap content in extra attributes as you would with older formats.
Each block uses the Schema.org vocabulary, which is the shared set of types and properties used for schema markup. A simple block has three key parts:
- @context: usually https://schema.org, telling machines which vocabulary is used.
- @type: the kind of thing described, such as Organization, Product, Article or LocalBusiness.
- Properties: name and value pairs, such as name, url, logo, address or price.
Blocks can be nested. A Product can contain an Offer with a price and availability. An Article can contain an author that is a Person. You can also use @id to connect items across a page or site, helping describe a consistent entity.
Why Google recommends it
Google supports three structured data formats: JSON-LD, Microdata and RDFa. It has said it recommends JSON-LD because it is the easiest to implement and maintain at scale. Practical advantages include:
- It does not get tangled in page templates or break when designers change the HTML.
- It can be generated by a CMS, plugin or tag manager.
- It is easy to read and debug.
- Google can read JSON-LD that is injected with JavaScript, although markup in the server-delivered HTML is more reliable.
Why it matters for SEO
Structured data helps search engines understand what a page is about. It is what makes a page eligible for rich results such as product prices, review stars, breadcrumbs and event details. Google has said structured data is not a general ranking factor, and eligibility does not guarantee a rich result will appear.
Clear, accurate structured data may also help other systems, including AI search tools, interpret your content, though no tool publishes a promise that it uses it.
How to add and test JSON-LD
- Choose the Schema.org types that match the page’s real content.
- Check Google’s documentation for required and recommended properties for that rich result.
- Generate the code with your CMS, an SEO plugin or by hand.
- Validate it with the Rich Results Test and the Schema Markup Validator.
- Monitor the enhancement reports in Search Console for errors and warnings.
Common mistakes
- Marking up content that is not visible on the page, such as reviews that do not exist, which breaks Google’s guidelines.
- Syntax errors such as missing commas, quotes or brackets that make the whole block unreadable.
- Duplicate or conflicting blocks from several plugins.
- Prices, dates or availability that do not match the visible page.
- Adding FAQ schema expecting rich results: since 2023 Google shows FAQ rich results only for well-known, authoritative government and health sites.
Key Takeaways
- JSON-LD is a script-based format for adding structured data to a page.
- Google supports several formats but recommends JSON-LD.
- It uses the Schema.org vocabulary of types and properties.
- Structured data can make pages eligible for rich results but is not a ranking factor.
- Always validate the code and keep it consistent with visible content.
Related Terms
Need a second opinion on your website? Ask for a free website SEO check, or keep learning in the SEO Encyclopedia.