Websites and Tech

JSON-LD

Also called JSON for Linking Data

A way of writing structured data as a block of code, separate from the visible page, that tells search engines what the page and business are.

Quick facts: JSON-LD

Category
Websites and Tech
Also called
JSON for Linking Data
Level
Intermediate
Affects
Rich results eligibility, how search engines and AI systems understand your business, knowledge panels
Where to see it
Google Rich Results Test, Schema Markup Validator, Search Console enhancement reports, browser View Source
In this article4
  1. How JSON-LD works
  2. Why it matters
  3. Common mistakes
  4. How to act on it

JSON-LD (JSON for Linking Data) is a format for adding structured data to a web page as a self-contained block of code, kept apart from the visible content. Search engines read it to learn facts about the page, such as which business it belongs to, what product it sells, or who wrote an article, without having to guess from the layout.

How JSON-LD works

The data sits inside a script tag of the type application/ld+json, usually in the page head. Inside it is a set of name and value pairs that use the vocabulary from Schema.org, the shared dictionary of schema markup types that Google, Bing and others recognise. Two keys always appear: @context, which points to schema.org, and @type, which says what is being described.

A short, illustrative example for a London bakery marked up as a LocalBusiness would contain these values:

  • “@type”: “Bakery”
  • “name”: “Example Bakery”
  • “telephone”: “+44 20 7946 0123” (a number range Ofcom keeps for fiction)
  • “address” as a PostalAddress with “streetAddress”, “addressLocality”: “London”, “postalCode”: “NW1 8AB” and “addressCountry”: “GB”
  • “areaServed”: “GB” or a list of London boroughs
  • “url”, “openingHoursSpecification” and “sameAs” links to official profiles

Because the block is separate from the HTML, you can add or change it without touching the design. Items can be linked to each other with an @id, so the organisation on your homepage, the person on your About page and the author of each blog post are recognised as the same entities across the whole site.

Why it matters

Google recommends JSON-LD over the older Microdata and RDFa formats, mainly because it is easier to write and maintain. Structured data is what makes a page eligible for rich results such as product prices and stock, review stars on products, event dates and breadcrumbs. Eligibility is not a promise: Google chooses when to show them, and it has narrowed some types over time. In 2023, for example, it restricted FAQ rich results to well-known government and health sites, so FAQ markup on a sales page will not produce them.

Beyond rich results, clear markup helps search engines and AI systems connect your business name, address, phone number and profiles. For a UK local business, consistent details in JSON-LD, on the page and on your Google Business Profile reduce the chance of being confused with a similarly named firm elsewhere.

Common mistakes

  • Marking up content that visitors cannot see, such as reviews collected elsewhere or FAQs hidden from the page. This breaks Google’s structured data guidelines and can lead to a manual action that removes rich results.
  • US formats copied from a template: a state field, a missing postcode, “US” as the country or a phone number without +44.
  • Two plugins, or a plugin and a theme, each outputting organisation markup with different names or logos.
  • Syntax errors such as a trailing comma or a curly quote pasted from a document, which stop the whole block being read.
  • Prices and opening hours in the markup that no longer match the page after an update.

How to act on it

Paste a few key URLs into the Rich Results Test and the Schema Markup Validator and note what is found, what is missing and what is wrong. Check one example of each template rather than every page. Then decide which types fit your business and pages, keep the details identical to what visitors see, and test again after every theme or plugin change.

Planning, writing and testing this markup across a whole site is the job of my schema markup and structured data service.

Do and do not

Do

  • Mark up only what is visible on the page
  • Use UK formats: GB country code, full postcode, +44 phone numbers
  • Test every template in the Rich Results Test after changes

Do not

  • Add review stars or FAQs that do not appear on the page
  • Leave two plugins outputting conflicting markup for the same thing
  • Assume valid markup guarantees a rich result

Questions people ask about this

Is JSON-LD the same as schema markup?

Not quite. Schema markup is the vocabulary, the agreed names for things like LocalBusiness, Product and openingHours. JSON-LD is one format for writing that vocabulary into a page; Microdata and RDFa are the others. Google recommends JSON-LD because it keeps the data in one block rather than spread through the HTML.

Can I add JSON-LD with Google Tag Manager?

You can, and Google can usually read it because it renders JavaScript, but it is not the most dependable route. The markup only exists after the tag fires, which can fail or be delayed, and other search engines and AI crawlers may not run it at all. Putting it directly in the page template or through your CMS is safer.

Does JSON-LD improve rankings?

Google has said structured data is not a general ranking factor. Its value is in helping search engines understand the page and in making it eligible for rich results, which can make a listing more useful and noticeable. Any change in clicks comes from that presentation, not from a ranking boost.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.