JSON-LD
JSON-LD is a W3C standard format for expressing Linked Data in JSON, and it is one of the ways to embed structured data into a web page. Google recommends JSON-LD over the other two structured data formats, Microdata and RDFa.
- JSON-LD stands for "JSON for Linked Data," a W3C standard for serializing Linked Data in the JSON format.
- JSON-LD is not a vocabulary itself but one of three implementation formats (JSON-LD, Microdata, and RDFa) for placing structured data on a page.
- Google officially recommends JSON-LD among the three because it is the easiest to implement and maintain.
- JSON-LD is embedded with a
<script type="application/ld+json">tag and operates separately from the visible page content. - Paired with the schema.org vocabulary, it can meet the eligibility requirements for search features such as rich results.
What JSON-LD Is
JSON-LD is a data format standardized by the W3C for expressing Linked Data in JSON, and at the same time it is Google's recommended way to mark up structured data. The name stands for "JSON for Linked Data," and json-ld.org defines it as "a lightweight Linked Data format that is easy for humans to read and write, built on the already widely used JSON format to help data interoperate at web scale."
The key point is that JSON-LD is a 'format' that carries meaning, not a 'vocabulary' that defines it. Within the broader concept of structured data, the schema.org vocabulary typically defines what data to express, while JSON-LD handles the syntax used to write that data into the page. Google Search recognizes three structured data formats — JSON-LD, Microdata, and RDFa — and JSON-LD is the one focused on implementation.
JSON-LD vs. Microdata vs. RDFa
All three formats can express the schema.org vocabulary, and Google treats them equally as long as the markup is valid. The difference lies in where and how the data is written.
| Aspect | JSON-LD | Microdata | RDFa |
|---|---|---|---|
| Where it is written | A separate script block (detached from page content) | Inline, in HTML tag attributes | Inline, in HTML tag attributes |
| Markup approach | A JSON object inside a script tag | Attributes such as itemscope and itemprop | Attributes such as typeof and property |
| Coupling with page HTML | Decoupled (no effect on content structure) | Tightly coupled (tied to the content) | Tightly coupled (tied to the content) |
| Mixing vocabularies / reversing relationships | Easy | Relatively difficult | Possible |
| Dynamic injection via JS or CMS | Straightforward (recognized by Google) | Tricky | Tricky |
| Google recommendation | Recommended | Supported | Supported |
The schema.org FAQ notes that Microdata has "harder parts, such as mixing multiple vocabularies or reversing the direction of property relationships," which is why support for RDFa and JSON-LD was added alongside it.
Example Code
Below is a JSON-LD example describing an Organization. A JSON object referencing the schema.org vocabulary goes inside a <script type="application/ld+json"> block, typically placed in the page's <head> or <body>.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Organization",
"name": "SearchOS",
"url": "https://searchos.io",
"logo": "https://searchos.io/logo.png",
"sameAs": [
"https://twitter.com/searchos",
"https://www.linkedin.com/company/searchos"
]
}
</script>Here, @context specifies the vocabulary to use (schema.org), @type declares the type of the data, and the remaining keys represent the properties of that type. Keywords like @context and @type are the JSON-LD-specific syntax that turns plain JSON into 'Linked Data.'
Evidence and Background
JSON-LD 1.1 was published as a W3C Recommendation on July 16, 2020, together with three specifications that reached Recommendation status at the same time: Syntax, Processing Algorithms and API, and Framing (per the W3C announcement). json-ld.org likewise lists these three specifications as W3C Recommendations.
Google Search Central documentation marks JSON-LD as "Recommended," explaining that "we recommend using JSON-LD where possible, as it's the easiest solution to implement and maintain at scale." It also advises that "all three formats (JSON-LD, Microdata, and RDFa) are equally suitable for Google, as long as the markup is valid and properly implemented per the feature's documentation." The fact that JSON-LD markup is detached from the body text and is still recognized when injected dynamically is given as another reason for the recommendation.