# JSON-LD

> JSON-LD is a JSON-based format for linked data, and Google

Canonical: https://scaplet.com/glossary/json-ld

Glossary Glossary · Structured data

JSON-LD is a JSON-based format for linked data, and Google's recommended way to add structured data. Syntax, @context, @type, and a working example.

3 min

read

4

sources

Oct 24, 2026

updated

Scaplet Editorial Team

author

In one line

JSON-LD is a JSON-based format to serialize Linked Data and a W3C Recommendation since July 2020. In SEO you place it in a script tag with type application/ld+json, so the visible HTML stays untouched. Google lists it as its recommended structured data format and can read it even when it is injected dynamically.

30-second check

## Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fjson-ld%20(%22JSON-LD%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fjson-ld%20(%22JSON-LD%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fjson-ld%20(%22JSON-LD%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fjson-ld%20(%22JSON-LD%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

On this page

## 6 parts, 3 minutes.

1. [What the syntax looks like 01](#what-the-syntax-looks-like)
2. [Embedding in HTML 02](#embedding-in-html)
3. [Why SEO uses it 03](#why-seo-uses-it)
4. [Tips most guides miss 04](#tips-most-guides-miss)
5. [Using @id and @graph 05](#using-id-and-graph)
6. [Common mistakes 06](#common-mistakes)

_01_Check it

## What the syntax looks like

Every JSON-LD document is valid JSON. Three keywords do most of the work: `@context` maps short terms to full IRIs, `@type` says what kind of [thing](/glossary/entity) a node is, and `@id` gives a node an identifier you can reference.

JSON-LD in a script tag

```
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Organization", "@id": "https://example.com/#org", "name": "Example Co", "url": "https://example.com" } </script>
```

_02_Explained

## Embedding in HTML

The spec allows JSON-LD inside a `<script>` element with `type="application/ld+json"`, and multiple script elements per document are supported.

Because it is separate from the content, templates and tag managers can output it, and Google reads it when it is injected dynamically.

JSON-LD also doubles as RDF, which is why the same data can feed other linked data tools. For SEO you rarely need that detail. What matters is that a parser reads your block as a graph of nodes, each with a type and properties, and that every node follows the vocabulary you named in `@context`.

_03_Explained

## Why SEO uses it

Google lists JSON-LD as the recommended format, but also says to use whichever format is easiest for you to implement and maintain. [Microdata](/glossary/microdata) and [RDFa](/glossary/rdfa) use HTML tag attributes, while JSON-LD is not interleaved with the user-visible text.

_04_Worth knowing

## Tips most guides miss

### Head or body, both fine

Google says JSON-LD is embedded in a `<script>` tag in the `<head>` and `<body>` elements.

### Injected is fine

Google reads it when dynamically injected by JavaScript or embedded widgets. Verify with the [Rich Results Test](/glossary/rich-results-test) URL input, which Google recommends over pasted code.

### Keep it true to the page

Don't mark up content that is not visible to readers.

_05_Check it

## Using @id and @graph

Use `@id` to name a node so other nodes can point to it. The W3C spec says `@id` is used to "uniquely identify node objects that are being described in the document with IRIs or blank node identifiers". A node that contains only `@id` is a reference to a node described elsewhere in the document. To put several top-level nodes in one script, wrap them in an object with a `@graph` key whose value is an array of the nodes.

Test a combined `@graph` block in the [Rich Results](/glossary/rich-results) Test before relying on it. Separate script elements also work, and that is the simpler choice if a graph isn't needed.

Two nodes linked by @id

```
{ "@context": "https://schema.org", "@graph": [ { "@type": "Organization", "@id": "https://example.com/#org", "name": "Example Co" }, { "@type": "Article", "headline": "What is JSON-LD?", "publisher": { "@id": "https://example.com/#org" } } ] }
```

_06_Checklist

## Common mistakes

First_2_
Invalid JSON, such as trailing commas or curly quotes

A missing `@context`, so terms don't map to schema.org

Next_2_
Describing content that isn't visible on the page

Wrong script type, such as `application/json`

Then_1_
Property names that don't exist in the vocabulary

Test the page URL in the Rich Results Test to confirm Google can read the markup, and fix whatever it flags.

When you generate markup from a template, escape quotes and line breaks in titles and descriptions. One unescaped quote in a product name is enough to break the whole block.

Sources · 4

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- w3.org
- google.com

1. 01 [JSON-LD 1.1](https://www.w3.org/TR/json-ld11/) w3.org · checked 2026-10-24
2. 02 [Introduction to structured data markup in Google Search](https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data) developers.google.com · checked 2026-10-24
3. 03 [General structured data guidelines](https://developers.google.com/search/docs/appearance/structured-data/sd-policies) developers.google.com · checked 2026-10-24
4. 04 [Generate structured data with JavaScript](https://developers.google.com/search/docs/appearance/structured-data/generate-structured-data-with-javascript) developers.google.com · checked 2026-10-24

Questions

## Asked a lot.

4 questions people ask next, answered from the sources on this page.

_01_ What does JSON-LD stand for?

JSON for Linked Data. The W3C describes it as a JSON-based format to serialize Linked Data.

_02_ Is JSON-LD only for SEO?

No. It is a general W3C format for linked data on the web. SEO is one common use.

_03_ Can a page have more than one JSON-LD block?

Yes. The spec supports multiple script elements in a document.

_04_ Where should the script go?

Google says JSON-LD can sit in a `<script>` tag in either the `<head>` or the `<body>`. Use whichever suits your templates.

## Keep learning

[All glossary](/glossary)

[Learn Schema Markup Structured data](/glossary/schema-markup) [Related Structured data for AI search Guides](/ai-search/structured-data-ai-search) [Read next Structured data Structured data](/glossary/structured-data) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in glossary
[JavaScript SEO](/glossary/javascript-seo) [JSON Feed](/glossary/json-feed) [Key events](/glossary/key-events) [Keyword clustering](/glossary/keyword-clustering)

More in Structured data
[Entity](/glossary/entity) [JSON-LD](/glossary/json-ld) [Knowledge Graph](/glossary/knowledge-graph) [Microdata](/glossary/microdata) [RDFa](/glossary/rdfa) [Rich Results Test](/glossary/rich-results-test) [sameAs](/glossary/sameas) [Schema Markup](/glossary/schema-markup) [Schema Markup Validator](/glossary/schema-markup-validator) [Structured data](/glossary/structured-data)

Terms on this page
[Entity](/glossary/entity) [Microdata](/glossary/microdata) [RDFa](/glossary/rdfa) [Rich Results Test](/glossary/rich-results-test) [Rich results](/glossary/rich-results)

Free · 2 minutes

## Know the term. _Now check your site._

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **+212%** organic clicks in 90 days Ledgerly
