What are the parts of a JSON-LD block?
Because JSON-LD is fully compatible with JSON, the usual JSON parsers and libraries can be reused [1]. The W3C lists what it adds on top of JSON in the table below [1].
| Feature | What the W3C says it does |
|---|---|
| Identifiers | A universal identifier mechanism for JSON objects, using IRIs [1] |
| Context | Disambiguates keys shared among different JSON documents by mapping them to IRIs [1] |
| References | A value in a JSON object may refer to a resource on a different site [1] |
| Language | The ability to annotate strings with their language [1] |
| Datatypes | A way to associate datatypes with values such as dates and times [1] |
| Graphs | A facility to express directed graphs, such as a social network, in a single document [1] |
In practice you meet three keys most often. @context says which vocabulary the keys come from, @type says what kind of thing the object is, and the rest are properties. Here is a made-up shop in Singapore.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Store",
"name": "Example Bikes",
"telephone": "+65 6000 0000"
}
</script>
The same text saved on its own is plain JSON that a parser can read. The script tag is what lets it live inside an HTML page [2].
Where do I put JSON-LD in a page?
Google describes JSON-LD as a notation embedded in a script tag in the head or body of an HTML page [2]. It says the markup is not interleaved with the text visitors read, which makes nested data easier to express [2]. Its own example is a country inside a postal address inside a music venue inside an event [2].
Google can also read JSON-LD that is injected into the page by JavaScript or by widgets in a CMS [2]. That matters if your site builder adds the block after the page loads.
Why does Google recommend JSON-LD over Microdata and RDFa?
Google supports three formats for structured data: JSON-LD, Microdata and RDFa. All three are equally fine for Google, as long as the markup is valid and properly implemented [2]. Its general advice is to pick the one that is easiest for you to implement and maintain, and in most cases that is JSON-LD [2].
Google also says it recommends JSON-LD if your site's setup allows it. Its reason is that site owners find it the easiest to implement and maintain at scale, so it is less prone to user errors [2]. Microdata and RDFa work differently. They use HTML tag attributes to name the properties you want to expose, instead of a separate block [2].
How do I check that my JSON-LD works?
Google calls its Rich Results Test an easy and useful tool for validating structured data and, in some cases, previewing a feature in Google Search [2]. It says to check your markup with that test during development, and with the rich result status reports after deployment. Markup can break after deployment because of templating or serving issues [2]. The reports live in Google Search Console.
Which properties a given Google result needs is a separate matter. Google says its documentation describes which are required, recommended or optional for each feature [2].
Questions people ask
What does the LD in JSON-LD stand for?
Linked Data. The W3C describes JSON-LD as a lightweight syntax to serialize Linked Data in JSON, and Linked Data as a way to create a network of standards-based, machine-interpretable data across different documents and websites [1].
Is JSON-LD the same as schema.org?
No. JSON-LD is the format, and schema.org is a vocabulary you can write in it. Google says most Search structured data uses the schema.org vocabulary [2]. The example above uses both: JSON-LD syntax, with a context pointing at schema.org [1][2].
Does JSON-LD have to be in the head of the page?
No. Google says JSON-LD can sit in the head or the body of an HTML page [2].
Pages that link here
Blog posts that use this term
See also
- Schema markup Schema markup is code added to a web page that labels its facts, such as a business name, address or price, in a format search engines can read.
- Google Search Console Google Search Console is a free tool from Google that shows how your website performs in Google Search and which pages Google has trouble reading.
- CMS A CMS (content management system) is software that lets you publish and change the text, images and other content on your website without writing code.
- SEO SEO is the work of making your website easy for search engines to understand and easy for people to find in search results.
References
- JSON-LD 1.1: A JSON-based Serialization for Linked Data, W3C. Read 27/11/2026.
JSON-LD is a lightweight syntax to serialize Linked Data in JSON
- Intro to how structured data markup works, Google Search Central. Read 27/11/2026.
The markup is not interleaved with the user-visible text, which makes nested data items easier to express