JSON-LD
JSON-LD (JSON for Linked Data) is a JSON-based format for machine-readable annotations, standardized by W3C in 2014. In SEO it's the preferred way to deliver Schema.org structured data — a `<script type="application/ld+json">` block, typically in the HTML `<head>`, decoupled from the visible DOM.
Long definition
JSON-LD's advantage for SEO is that it separates the semantic annotation from the presentation markup. Compared to Microdata or RDFa (which sprinkle itemtype and property attributes across HTML elements), JSON-LD lives in a single script block and can be generated, updated, and audited independently of the template.
Minimal example:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "How crawl budget actually works",
"datePublished": "2026-04-24",
"author": {
"@type": "Person",
"name": "Enric Ramos"
},
"image": "https://example.com/hero.jpg"
}
</script>
Two properties that matter:
@context— alwayshttps://schema.orgfor Schema.org annotations. Tells the parser which vocabulary to load.@type— the Schema.org type. Can be a string or an array for multi-typing (e.g.,["Person", "Author"]).
Multiple <script> blocks on one page are valid — useful when a page describes multiple entities (an article + its author + the publishing organization). Google parses them independently. Most CMSs ship one block per entity type.
Delivery gotchas:
- Inject via JavaScript is OK as long as Googlebot can execute the script. Googlebot does render pages, but server-rendering JSON-LD is more reliable and faster to parse.
- Escape HTML inside strings — a blog title with
"or<in it must be JSON-escaped. Broken JSON is silently ignored by crawlers. - Always validate with Google's Rich Results Test and the Schema.org validator. Different tools catch different issues.
Common misconceptions
- "JSON-LD must be in the
<head>." It's recommended for clarity but not required.<body>works too. Just don't split one logical entity across multiple<script>blocks unless you know what you're doing. - "Schema.org and JSON-LD are the same thing." They aren't. Schema.org is the vocabulary; JSON-LD is one of three syntaxes for delivering it (alongside Microdata and RDFa). Both are needed for meaning to reach search engines.
- "Google reads JSON-LD before rendering." Google's indexing does two passes: initial HTML parse, then render + second pass. JSON-LD is picked up in the first pass if it's in the static HTML; from dynamic injection you need the render pass. For critical SEO features, server-render.
- "You can't combine JSON-LD with Microdata on the same page." You can, but it's a maintenance nightmare. One format per page.
Continue exploring