What Is JSON-LD?
A beginner-friendly explanation of JSON-LD (JavaScript Object Notation for Linked Data), how it works, and why Google recommends it for structured data.
JSON-LD stands for JavaScript Object Notation for Linked Data. It’s a lightweight data format that lets you embed structured, machine-readable information directly into your web pages using a simple <script> tag.
Google, Bing, and other search engines use JSON-LD to understand the meaning of your content — not just the text, but what the text represents. A product page, a recipe, an FAQ section, a local business listing — JSON-LD tells search engines exactly what kind of entity your page describes.
Why JSON-LD Exists
Before JSON-LD, developers had two main options for adding structured data to web pages:
- Microdata — HTML attributes embedded directly into your page markup. Tightly coupled to your HTML structure.
- RDFa — Another set of HTML attributes for linked data. Complex and verbose.
Both approaches require mixing data annotations into your existing HTML, making templates harder to maintain. JSON-LD solved this by completely separating the structured data from the page markup.
How JSON-LD Works
JSON-LD lives inside a <script> tag with type="application/ld+json". Here’s a simple example:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "What Is JSON-LD?",
"author": {
"@type": "Person",
"name": "Sanjay Samanta"
},
"datePublished": "2026-06-04",
"publisher": {
"@type": "Organization",
"name": "Open Graph Generator"
}
}
</script>
Key Components
| Component | Purpose |
|---|---|
@context |
Declares the vocabulary (almost always https://schema.org) |
@type |
Specifies the entity type (Article, Product, FAQPage, etc.) |
| Properties | Key-value pairs describing the entity |
| Nested objects | Child entities (author, publisher, etc.) |
The beauty of JSON-LD is that you can drop this <script> block anywhere in your <head> or <body> without touching a single line of your existing HTML or CSS.
What JSON-LD Unlocks in Search
When Google’s crawler encounters valid JSON-LD on your page, it can display rich results — enhanced search listings with extra visual elements:
- FAQ dropdowns — Expandable question/answer sections directly in search results.
- Star ratings — Average review scores for products and businesses.
- Recipe cards — Cooking time, calories, and ingredients.
- Event listings — Date, location, and ticket availability.
- How-to steps — Numbered instruction steps with images.
- Breadcrumb trails — Hierarchical navigation paths.
Without JSON-LD (or equivalent structured data), these rich result features are unavailable.
JSON-LD vs Other Formats
| Feature | JSON-LD | Microdata | RDFa |
|---|---|---|---|
| Separation from HTML | ✅ Complete | ❌ Inline | ❌ Inline |
| Ease of implementation | ✅ Easy | ⚠️ Moderate | ❌ Complex |
| Google’s recommendation | ✅ Preferred | ✅ Supported | ✅ Supported |
| Dynamic content support | ✅ Easy | ⚠️ Difficult | ⚠️ Difficult |
For a detailed comparison, see JSON-LD vs Microdata.
Getting Started
Ready to add JSON-LD to your site? Start with these guides:
- JSON-LD Examples: Complete Guide — Copy-paste examples for every common schema type.
- How to Create JSON-LD — Step-by-step tutorial.
- Schema.org JSON-LD: The Developer’s Guide — Our comprehensive pillar guide.
- Schema Inspector — Validate your JSON-LD directly in the browser.