---
title: "JSON-LD"
description: "JSON-LD is a block of code that states a page's facts, like price or address, in a form machines read. Google recommends it for structured data."
url: https://ursy.com/wiki/json-ld/
updated: 2026-11-26T15:41:53+00:00
publisher: URSY (https://ursy.com/)
cite: Name URSY and link https://ursy.com/wiki/json-ld/
---

# JSON-LD

> JSON-LD is a block of code that states a page's facts, like price or address, in a form machines read. Google recommends it for structured data.

**JSON-LD (JavaScript Object Notation for Linked Data) is a way of writing facts about a page, such as a product’s price or a business’s address, as a small block of code that machines can read, kept separate from the words people see.** It is the format [Google](https://ursy.com/wiki/google/) recommends for [schema markup](https://ursy.com/wiki/schema-markup/) where your site allows it.

## What is JSON-LD? {#what-is-json-ld}

JSON is a plain text format for data that most programming languages read. JSON-LD adds a few rules so the data links to shared meanings. The W3C [JSON-LD 1.1 specification](https://www.w3.org/TR/json-ld11/), a W3C Recommendation published on 16 July 2020, defines it as a JSON-based format to serialise Linked Data. The project site [json-ld.org](https://json-ld.org/) calls it lightweight, easy for humans to read and write, and built on the already successful JSON format.

On a web page, JSON-LD almost always describes things using the [schema.org](https://schema.org/docs/gs.html) vocabulary: types like Product, LocalBusiness, Article and Event, each with named properties.

## What does it look like? {#what-does-it-look-like}

Here is a short block for one product, placed inside a script tag in the page’s [HTML](https://ursy.com/wiki/html/):

```
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Glass Kettle 1.7 Litre",
  "sku": "GK-17",
  "offers": {
    "@type": "Offer",
    "price": "39.99",
    "priceCurrency": "GBP",
    "availability": "https://schema.org/InStock"
  }
}
</script>
```

Visitors never see it. A crawler reads it and learns, without guessing, that this page sells one kettle at £39.99 in pounds sterling, in stock.

## What do the @ words mean? {#what-do-the-words-mean}

The W3C specification defines a small set of [keywords](https://ursy.com/wiki/keyword/) that start with @. The 4 you meet most:

| Keyword | What it does | Typical value |
| --- | --- | --- |
| @context | Defines the short names used in the block | https://schema.org |
| @type | Sets the type of the thing described | Product, LocalBusiness |
| @id | Gives the thing a unique identifier, usually an address | https://example.co.uk/#shop |
| @graph | Holds several linked things in one block | A list of items |

## Why does it matter for search? {#why-does-it-matter-for-search}

Google’s [introduction to structured data](https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data) names 3 formats: JSON-LD, [Microdata](https://ursy.com/wiki/microdata/) and RDFa. It says Google generally recommends JSON-LD if your site’s setup allows it, and that all 3 are equally fine as long as the markup is valid. It describes JSON-LD as notation in a script tag that can sit in the head or the body, and notes that it is not interleaved with the visible text. That separation is the main practical win: you can change the design without breaking the data.

Valid markup makes a page eligible for a [rich snippet](https://ursy.com/wiki/rich-snippet/), such as price and stock on a product or [review stars](https://ursy.com/wiki/review-snippets/). It does not force one to show. Google’s [general structured data guidelines](https://developers.google.com/search/docs/appearance/structured-data/sd-policies) say plainly that even correct markup may never appear in results; Google makes that call.

## Why does it matter for AI answers? {#why-does-it-matter-for-ai-answers}

JSON-LD hands over facts in labelled form: this is the price, this is the opening time. That lowers the chance of an assistant misreading a page and producing an [AI hallucination](https://ursy.com/wiki/ai-hallucination/) about you. Google’s page on AI features asks site owners to make sure their structured data matches the visible text on the page, and states that no extra requirements apply for [AI Overviews](https://ursy.com/wiki/ai-overview/) or [AI Mode](https://ursy.com/wiki/google-ai-mode/). Clean, honest JSON-LD helps any machine reader, which is the heart of [answer engine optimisation](https://ursy.com/wiki/answer-engine-optimisation/) and [generative engine optimisation](https://ursy.com/wiki/generative-engine-optimisation/) and of being a well-defined [entity](https://ursy.com/wiki/entity/).

## Can JavaScript add it after the page loads? {#can-javascript-add-it-after-the-page-loads}

Yes, with care. Google’s intro page says it can read JSON-LD that is dynamically injected into the page. Its guide to [generating structured data with JavaScript](https://developers.google.com/search/docs/appearance/structured-data/generate-structured-data-with-javascript) covers [Google Tag Manager](https://ursy.com/wiki/google-tag-manager/) and custom scripts. It also warns that dynamically generated markup can make Shopping crawls less frequent and less reliable, which matters for fast-changing prices and stock. Other crawlers, including many AI ones, may not run scripts at all; see [JavaScript SEO](https://ursy.com/wiki/javascript-seo/). Put product facts in the HTML your server sends.

## Common mistakes {#common-mistakes}

- **Facts readers cannot see.**  Google’s guidelines say not to mark up content that is not visible to readers of the page.
- **Stale prices.**  The page says £34.99 in a sale; the JSON-LD still says 39.99. Keep your [shopping feed](https://ursy.com/wiki/shopping-feed/) in step too.
- **Two plugins, two blocks.**  A theme and a [WordPress SEO](https://ursy.com/wiki/wordpress-seo/) plugin both output a Product block with different values.
- **Broken JSON.**  One missing comma or a curly quote pasted from a word processor stops the whole block from parsing.
- **Vague types.**  Google asks for the most specific applicable type, so a bakery should use Bakery rather than a generic LocalBusiness.
- **Separate blocks that never connect.**  The same guidelines suggest using @id to show that, say, a video is about the recipe on the same page.

## A worked example {#a-worked-example}

A small bakery in Leeds wants its hours and address read correctly. Its home page carries one block:

```
{
  "@context": "https://schema.org",
  "@type": "Bakery",
  "@id": "https://example-bakery.co.uk/#bakery",
  "name": "Example Bakery",
  "telephone": "+44 113 496 0000",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "1 Example Street",
    "addressLocality": "Leeds",
    "postalCode": "LS1 1AA",
    "addressCountry": "GB"
  },
  "openingHours": "Tu-Sa 08:00-16:00"
}
```

Every value also appears in the page footer. When the hours change at Christmas, the owner edits both on the same day. That habit matters more than any clever property.

## How to check it {#how-to-check-it}

1. List every JSON-LD block, type and property on a page with our [Schema Markup Checker](https://ursy.com/schema-checker/). Our guide on [how to use the schema checker](https://ursy.com/guides/how-to-use-schema-checker/) walks through the results.
2. Draft missing blocks with our [Schema Markup Generator](https://ursy.com/schema-generator/), then tidy the code with the [JSON formatter](https://ursy.com/webmaster-tools/json-formatter/).
3. Pull the facts out of a block in plain words with the [structured data facts extractor](https://ursy.com/webmaster-tools/structured-data-facts-extractor/).
4. Check that page, markup and other machine files agree with the [AI Consistency Checker](https://ursy.com/ai-consistency-checker/).
5. For shops, the [Product Page Checker](https://ursy.com/product-page-checker/) reviews product markup alongside the rest of the page.
6. Test the address in Google’s Rich Results Test, then watch the reports in [Google Search Console](https://ursy.com/wiki/google-search-console/). In URSY Pro, the [structured data monitor](https://ursy.com/pro/structured-data-monitor/) warns you when a block changes or breaks.

## Questions {#questions}

### Does JSON-LD go in the head or the body? {#does-json-ld-go-in-the-head-or-the-body}

Either. Google reads both.

### Is JSON-LD a ranking factor? {#is-json-ld-a-ranking-factor}

Google does not describe it as one. It helps Google understand the page and makes rich results possible.

### Can I have more than one block on a page? {#can-i-have-more-than-one-block-on-a-page}

Yes. Google reads several items, nested or separate. Link related ones with @id.

### Do I need to know how to code? {#do-i-need-to-know-how-to-code}

Most shop and blog systems add basic blocks for you. You only need to check the output is correct and current.

## Related words {#related-words}

- [Schema markup](https://ursy.com/wiki/schema-markup/)
- [Rich snippet](https://ursy.com/wiki/rich-snippet/)
- [Product structured data](https://ursy.com/wiki/product-structured-data/)
- [Knowledge graph](https://ursy.com/wiki/knowledge-graph/)
- [Entity](https://ursy.com/wiki/entity/)

## Sources {#sources}

- [W3C: JSON-LD 1.1, W3C Recommendation 16 July 2020](https://www.w3.org/TR/json-ld11/), checked 24 November 2026
- [json-ld.org: JSON for Linking Data](https://json-ld.org/), checked 24 November 2026
- [schema.org: Getting started with schema.org](https://schema.org/docs/gs.html), checked 24 November 2026
- [Google Search Central: Introduction to structured data markup in Google Search](https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data), checked 24 November 2026
- [Google Search Central: General structured data guidelines](https://developers.google.com/search/docs/appearance/structured-data/sd-policies), checked 24 November 2026
- [Google Search Central: Generate structured data with JavaScript](https://developers.google.com/search/docs/appearance/structured-data/generate-structured-data-with-javascript), checked 24 November 2026
- [Google Search Central: AI features and your website](https://developers.google.com/search/docs/appearance/ai-features), checked 24 November 2026

*Updated 24 November 2026 by URSY.com.*
