Glossary: JSON-LD
What is JSON-LD?
JSON-LD, short for JavaScript Object Notation for Linked Data, is a format for adding structured data to a web page inside a script tag of type application/ld+json. It describes the page using schema.org types without changing the visible HTML. Google recommends it as the easiest structured data format to add and maintain.
Check your AI visibility
See in seconds whether ChatGPT, Claude, Perplexity and Google's AI crawlers can read your site.
- GPTBot
- OAI-SearchBot
- ClaudeBot
- PerplexityBot
- Google-Extended
- Bingbot
- Which AI crawlers can read your site, right here
- Schema, llms.txt and search basics in the full report
- Your top fixes, ready to paste, after a no-cost signup
How JSON-LD is put together
Older formats such as Microdata wrap attributes around visible elements, which ties the markup to the layout. JSON-LD sits in its own block, usually in the page head, so templates can generate it from data without touching the design.
It is a W3C standard. In SEO it is almost always used to carry schema.org markup, with a @context of https://schema.org and a @type such as Organization, Article or Product.
Context and type
Each block starts with @context pointing to schema.org and a @type naming what is described. Properties such as name, url and description follow as key and value pairs.
Linking entities with @id
An @id gives an entity a stable identifier, such as your homepage URL plus #organization, so other blocks on other pages can refer to the same company.
One or several blocks
A page can have several JSON-LD blocks, or one block with a @graph array holding related entities such as the WebPage, the Article and the Organization.
Step by step
How to add JSON-LD without breaking it
- 01Generate it from page dataBuild the JSON in your template from the same fields the page displays, so the markup and the visible content never disagree.
- 02Serialize it safelyUse a JSON serializer rather than string concatenation, so quotes and line breaks in titles do not produce invalid JSON.
- 03Render it in the HTMLMake sure the script tag is in the HTML the server sends, not only added later by scripts, so every crawler can read it.
- 04Validate a page per templatePaste a live URL into the Rich Results Test and the Schema Markup Validator after each template change.
- 05Keep identifiers stableReuse the same @id values for your organization and website across all pages so the entities link up.
Checklist
Checklist
- Script type set to application/ld+json
- @context and @type on every block
- Generated with a JSON serializer
- Present in the server rendered HTML
- Stable @id values for organization and website
- Validated after every template change
Validate the JSON-LD on your templates
Run the audit on your domain to see schema coverage and errors, then sign up at no cost for corrected JSON-LD to paste in.
Questions
Is JSON-LD the same as schema markup?
No. Schema.org is the vocabulary. JSON-LD is one format for writing it. You can write schema.org markup in JSON-LD, Microdata or RDFa.
Can JSON-LD go in the body instead of the head?
Yes. Google reads JSON-LD in either place. The head is common because it keeps the markup together, but placement does not change how it is read.
Does invalid JSON-LD hurt my site?
Invalid markup is usually ignored rather than penalized, but you lose any benefit from it. A single stray quote can make a whole block unreadable.
Not ready to sign up?
Leave your work email and we will send practical notes on getting found in AI answers, one at a time. Add your site if you want them to fit it. Unsubscribe any time.
Keep reading
Related
Related pages
Guides that go deeper
Last updated 2026-11-21
