Guide : JSON-LD

JSON-LD is the script-based données structurées format Google recommends — easiest to implement, jamais touches visible HTML, and typically pairs with schema.org pour le SEO.

Première publication : 26 juin 2026 · Dernière mise à jour : 3 août 2026 · Advanced
Langues
1 indice probant sur cette page

JSON-LD (JavaScript Object Notation pour Lié Données) is a données structurées format que lives in a <script type="application/ld+json"> tag; on the SEO side it's typically paired with the schema.org vocabulary to décrire page content, though JSON-LD itself peut carry autre vocabularies aussi. It's a W3C standard (2014), and Google recommends it over Microdata and RDFa pour un raison: it's the easiest format to implement and maintain at scale, parce que it sits in its propre block and jamais touches votre visible HTML. Tout three formats fonctionner equally bien quand implemented correctement. The syntax spine is @context (the vocabulary — schema.org pour la plupart SEO markup, but pas the seulement valid valeur), @type (the entity), and @id (a utile but optional stable URI pour linking entities — the basis of the @graph pattern, itself un valid façon to organize multiple entities, pas a requirement). The catch la plupart guides miss: Googlebot renders JavaScript so dynamically injected JSON-LD fonctionne pour Google, but several AI robots d’exploration — GPTBot and ClaudeBot inclus, as testé — don't execute JavaScript; that's provider- and date-specific, pas a universal rule, so vérifier directement si a particulier robot d’exploration matters to vous and server-render markup vous pouvez't confirmer sinon. Données structurées n’est pas a ranking signal; it governs rich-result eligibility and entity understanding, and it doit décrire content en réalité visible on lune page.

TL;DR — JSON-LD (JavaScript Object Notation pour Lié Données) is a W3C Recommendation from 2014 — construit on JSON, but @context is ce que rend it lié données, pas simplement JSON. It’s the données structurées format Google recommends parce que it’s the easiest to implement and maintain at scale and jamais touches visible HTML; Microdata and RDFa are equally valid quand correct. The syntax spine is @context (vocabulary — schema.org pour la plupart SEO markup, though the spec permet autre contexts), @type (entity), @id (a utile but optional stable URI pour cross-referencing entities — the basis of @graph, itself un valid pattern among others, pas a requirement). Placer it in <head> or <body> — Google accepts soit. Googlebot renders JS so dynamically injected JSON-LD fonctionne pour Google; several AI robots d’exploration (GPTBot, ClaudeBot inclus, as testé) don’t execute JS, but that’s provider- and date-specific — vérifier directement plutôt que assuming it pour every AI robot d’exploration, and server-render ce que vous pouvez’t confirmer. Données structurées is pas a ranking signal — it drives rich-result eligibility and entity understanding, and it doit décrire content visible on lune page.

JSON-LD is a format, pas a vocabulary

Premier, a distinction que clears up a lot of confusion: JSON-LD is the format; schema.org is the vocabulary. JSON-LD is how vous écrire the markup; schema.org’s Article, Product, Organization types are ce que vous dire. Résultats enrichis are the fonctionnalité couche on top of les deux. Ce page is à propos de the format. (The vocabulary-for-AI angle lives in Balisage de données structurées pour AI.)

JSON-LD is a W3C Recommendation, premier publié in 2014 — it predates its SEO adoption and was designed pour general linked-data interoperability à travers the web, pas specifically pour search. Que history is pourquoi a property comme @id exists at tout, and it’s the spec-level point la plupart SEO guides skip: JSON-LD n’est pas simplement JSON. It’s construit on JSON syntax, but the @context declaration is ce que rend the données lié — identifiable and connectable à travers the web. Strip @context and you’ve got données a parser can’t interpret.

JSON-LD aussi isn’t married to schema.org. The spec lets @context référence quelconque publié vocabulary — its propre exemples lien to non-schema.org contexts — so JSON-LD is the correct réponse to “what format” pendant que schema.org is un réponse, the courant un pour search and AI-search markup, to “what vocabulary.” Une page pourrait validly utiliser JSON-LD with a différent vocabulary; it simplement wouldn’t be schema.org markup anymore.

JSON-LD vs. Microdata vs. RDFa

Là are three façons to express données structurées, and Google supports tout of les:

JSON-LDMicrodataRDFa
Où it livesA separate <script> blockInline itemprop attributes on votre HTMLInline property attributes on votre HTML
Touches visible HTML?AucunYesYes
Peut be injected by JS / tag manager?Yes (cleanly)AwkwardAwkward
Google’s stanceRecommendedPris en chargePris en charge
Error-pronenessLowestPlus élevé (tangled with markup)Plus élevé (tangled with markup)

Google’s recommendation is explicit but narrowly scoped: “In general, Google recommends en utilisant JSON-LD pour données structurées si votre site’s setup permet it, as it’s the easiest solution pour website owners to implement and maintain at scale (in autre words, moins prone to utilisateur errors).”

The nuance competitors usually drop — and the un worth keeping — comes from the même Google page: “Tout 3 formats are equally fine pour Google, tant que the markup is valid and correctement implemented per the feature’s documentation.” So the recommendation is à propos de implementation ease and error rate, pas parsing speed or ranking advantage. En utilisant Microdata n’est pas a penalty. JSON-LD simplement wins En pratique parce que it doesn’t entangle données structurées with the markup a designer pourrait edit tomorrow.

The syntax: @context, @type, @id, properties, nesting

Here’s an annotated Article block:

<script type="application/ld+json">
{
  "@context": "https://schema.org",          // the vocabulary — the common value for SEO
  "@type": "Article",                          // the entity type
  "@id": "https://example.com/post#article",   // a stable URI for this entity
  "headline": "How JSON-LD Works",            // a property (key/value)
  "datePublished": "2026-06-26",
  "author": {                                  // a nested entity
    "@type": "Person",
    "name": "Patrick Stox",
    "url": "https://patrickstox.com/"
  }
}
</script>
  • @context — establishes the semantic framework (the vocabulary). Pour schema.org SEO markup it’s typically "https://schema.org", but that’s a convention, pas a rule: @context maps terms to identifiers, and the spec lets it point to autre vocabularies. It indique the parser how to interpret every property nom que follows. Ce is the partie que rend it lié données.
  • @type — declares the entity: Article, Product, Organization, BreadcrumbList, etc. It maps to a schema.org type. Utiliser the la plupart spécifique applicable typeNewsArticle over Article si it fits.
  • @id — a unique URI identifying the resource. It’s the mechanism que lets vous référence un entity from un autre (voir @graph ci-dessous), and it’s worth setting on anything you’ll cross-reference — but it’s pas universally requis. The JSON-LD spec permits unidentified blank nodes, so valid JSON-LD peut omit @id on entities vous jamais besoin to référence elsewhere.
  • Properties — ordinary JSON clé/valeur pairs, en utilisant vocabulary terms from the @context.
  • Nesting — child entities are expressed as nested JSON objects (the author object ci-dessus) or arrays of objects.

The @graph pattern (the scalable approach)

La plupart pages besoin plus que un entity: an Organization, a WebSite, a BreadcrumbList, and the Article or WebPage itself. The naive approach is four separate <script> blocks que repeat données. A scalable alternative is a unique block with @graph — an array of entities, cross-referenced by @id. Neither the JSON-LD spec nor Google mandates @graph as the pattern — it’s syntax pour expressing a graph, and autre valid layouts exist (separate typed blocks, nested objects sans a top-level @graph, blank nodes with aucun @id at tout) — but on a site with several cross-referenced entities, it’s the pattern que avoids repeating the même Organization or WebSite données on every page:

Declare each entity once and connect the graph with stable `@id` references instead of repeating full objects. Source : Nested Schema

One Organization is referenced as publisher by the WebSite and Article. The WebPage belongs to the WebSite and is connected to the Article. Each entity is declared once, and the same stable ID string is reused for every reference.

© Patrick Stox LLC · CC BY 4.0 ·

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "Organization",
      "@id": "https://example.com/#org",
      "name": "Example Co",
      "url": "https://example.com/"
    },
    {
      "@type": "WebSite",
      "@id": "https://example.com/#website",
      "url": "https://example.com/",
      "publisher": { "@id": "https://example.com/#org" }   // reference, not a copy
    },
    {
      "@type": "WebPage",
      "@id": "https://example.com/post#webpage",
      "isPartOf": { "@id": "https://example.com/#website" },
      "breadcrumb": { "@id": "https://example.com/post#breadcrumb" }
    }
  ]
}
</script>

Define Organization une fois, alors point at it with { "@id": "...#org" } everywhere sinon au lieu de repeating the nom, logo, and URL. Ce is how the major CMS schema plugins construire leur output, and it’s pourquoi @id exists. Bing rend the même cas pour JSON-LD’s nesting: it “rend defining liens and relationships entre données and entities… facile parce que it supports nested données.”

Où to placer it: <head> or <body>

Google confirms les deux fonctionner“Vous pouvez put the JSON-LD données in the <head> or the <body> of lune page.” <head> is conventional, but plenty of CMS plugins inject it near the fin of <body>, and that’s fine. Bing agrees it peut sit “in the header, corps or foot of lune page.” Don’t burn temps relocating a valid block from corps to head; it changements nothing. Evidence for this claim Google permits JSON-LD in either the head or body of an HTML document for supported structured-data features. Scope: Google Search JSON-LD guidance; markup must still match visible page content. Confidence: high · Verified: Google: Structured data introduction

Generating JSON-LD dynamically — and the AI robot d’exploration catch

Vous pouvez construire JSON-LD on the fly with JavaScript, and Google documents two façons to do it:

Evidence for this claim Dynamically generated structured data is acceptable to Google when it is rendered and complies with content and quality guidelines. Scope: Google Search JavaScript and structured-data guidance; crawlability and rendering remain prerequisites. Confidence: high · Verified: Google: Generate structured data with JavaScript
  1. Google Tag Manager — a Custom HTML tag containing the JSON-LD, pulling valeurs from GTM variables. (Éviter duplicating données entre lune page and the tag.)
  2. Custom JavaScript — créer the script element programmatically:
    const script = document.createElement('script');
    script.setAttribute('type', 'application/ld+json');
    script.textContent = structuredDataText;
    document.head.appendChild(script);

Ce fonctionne pour Googlebot, parce que Google renders lune page: “Recherche Google peut comprendre and traiter données structurées that’s disponible in the DOM quand it renders lune page.” So far, so bon.

Here’s the catch la plupart guides miss, stated carefully. Several AI robots d’exploration — notamment GPTBot and ClaudeBot, as commonly testé — have pas executed JavaScript. Si votre JSON-LD seulement exists après a client-side script runs, a JS-skipping robot d’exploration jamais sees it — it’s invisible to que bot même though Googlebot reads it fine, parce que Google documents rendering the DOM avant it semble pour données structurées.

Two honest caveats on que AI-crawler behavior: it’s Google’s propre documentation que establishes the Googlebot side; the AI-crawler side comes from testing and reporting on individual providers, pas a spec quelconque of les publish, so it’s provider- and date-specific — a crawler’s JavaScript prise en charge peut modifier, and I haven’t verified every provider directement. Don’t treat “AI crawlers skip JS” as a universal rule to construire on; treat it as a raison to vérifier the robot d’exploration vous en réalité care à propos de (or par défaut to server rendering quand vous pouvez’t vérifier). Si it isn’t in le serveur-rendered HTML and vous haven’t confirmed the robot d’exploration executes JS, assume it can’t voir it. Pour AI-search visibility, render JSON-LD server-side into the static HTML unless you’ve verified sinon. (Ce is the JavaScript-rendering problem from a structured-data angle — voir JavaScript SEO.)

There’s a second caveat pour ecommerce: Google warns que dynamically generated Product markup “can make Shopping crawls less frequent and less reliable,” qui is a réel problem pour fast-changing price and availability. Pour products, préférer rendu côté serveur regardless of AI.

The policies (ces have teeth now)

Google’s données structurées guidelines are short and load-bearing:

  • “Don’t mark up content that is not visible to readers of the page.”
  • “Don’t mark up irrelevant or misleading content, such as fake reviews.”
  • “Put the structured data on the page that it describes.”
  • “Use the most specific applicable type and property names defined by schema.org.”
  • Don’t block votre structured-datune pages from Googlebot via robots.txt or noindex.

The visible-content rule is the un to internalize. Schema que describes content pas affiché on lune page has toujours been a violation; enforcement of “invisible” schema has tightened. Bing puts the warning bluntly: “même though the markup n’est pas visible on votre page, it is encore lire by the moteur de recherches, and putting spam données in the markup peut hamper votre presence.”

Courant JSON-LD mistakes

  • Markup que doesn’t match the visible page — the #1 policy problem (a rating in the JSON-LD que aucun visitor sees).
  • Malformed JSON — a trailing comma, an unescaped quote, or Word smart quotes (" au lieu de ") que silently break the whole block. JSON-LD is strict.
  • Incorrect property noms — inventing properties que aren’t in schema.org, or misspelling réel ones, so the parser ignores les.
  • A generic type où a spécifique un existsThing or ArticleRecipe or NewsArticle was warranted.
  • Duplicate, inconsistent Organization blocks à travers pages with conflicting noms/logos.
  • Manquant requis properties pour the rich result you’re targeting (chaque fonctionnalité listes its propre requis fields).
  • JS-injected markup assumed to be visible to every robot d’exploration — Google renders it, but some AI robots d’exploration have pas, and that’s worth verifying per robot d’exploration (the catch ci-dessus).

Validating JSON-LD

Four différent questions obtenir asked sous “is my JSON-LD valid,” and they’re pas the même question — passing un doesn’t réussir the others:

TesterProvesNe fait pas prove
JSON parses (quelconque JSON linter, or the Résultats enrichis Test’s parse step)The syntax is legal JSON — aucun trailing commas, unescaped quotes, or smart-quote breakageQue quelconque property nom is réel schema.org vocabulary, or que Google va montrer anything
Schema.org ValidatorThe properties and types exist in the schema.org vocabularyQue Google supports the type as a rich result, or que requis fields pour a spécifique fonctionnalité are présent
Résultats enrichis TesterThe markup meets Google’s requirements pour a spécifique pris en charge rich-result type, on the rendered page vous testéQue Google va en réalité afficher the rich result — eligibility isn’t a guarantee — or que autre search/AI systems parse it the même façon
Recherche Google Console — Enhancements / rich result reportsCe que Google en réalité parsed on live, crawled pages, at scale, with réel errorsReal-time state — reports lag behind a recrawl
  • Tester by URL, pas pasted code, pour JS-rendered pages. The Résultats enrichis Test’s code-input mode doesn’t run votre scripts or resolve relative références the façon live-URL testing fait — it can’t tell vous ce que a client-side-injected block semble comme après rendering.
  • Bing Webmaster Outils — Markup Validator — Bing has validated JSON-LD since August 2018.
  • None of ces tests speak pour robots d’exploration que don’t render JavaScript (voir the AI-crawler caveat ci-dessus) — testing the rendered URL confirms ce que Google sees, pas ce que a JS-skipping bot receives.

Fait JSON-LD aider SEO?

Définir expectations honestly:

  • Pas a ranking signal. John Mueller has said données structurées won’t faire a site rank meilleur. Complet arrêter.
  • Rich-result eligibility. It’s ce que rend vous eligible pour enhanced SERP fonctionnalités (stars, prices, FAQs, breadcrumbs) — eligibility, pas a guarantee.
  • CTR, indirectly. Richer-looking results peut earn plus clicks, qui is the réel payoff pour la plupart sites.
  • Entity understanding. It helps engines connecter votre page to connu entities and the Knowledge Graph.
  • AI search. Fabrice Canel (Bing) confirmed in 2025 que balisage de données structurées helps Microsoft’s LLMs comprendre content — but remarque the controlled-study caveat from Balisage de données structurées pour AI: it’s infrastructure pour disambiguation, pas a direct citation lever.

So: implement JSON-LD pour rich-result eligibility, entity clarity, and AI/LLM comprehension — pas as a ranking hack.

Ce article sits in the données structurées hub. Pour the AI-specific prendre on the schema.org vocabulary, voir Balisage de données structurées pour AI; pour the rendering mechanics behind dynamic injection, voir JavaScript SEO.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin a quote first.