note2026 Update: This page now works best as the implementation companion in the structured-data cluster. If you’re new to the topic, start with What is JSON-LD?, then JSON-LD Examples, then Schema.org for Developers.
If the basics of JSON-LD already make sense but the implementation details keep getting messy, this is the page for that.
The tricky part is rarely the first application/ld+json block. It’s keeping the markup accurate, validating the right thing, and avoiding the quiet drift between what the page says and what the schema says.
JSON-LD is still the format Google usually recommends when your site setup allows it, mostly because it’s easier to implement and maintain than inline alternatives.
Why JSON-LD Became the Default Implementation Choice
Before diving into the implementation details, it helps to remember why teams gravitate toward JSON-LD in the first place.
tipIf you need the conceptual version first, go to What is JSON-LD?. This page is about shipping and maintaining it cleanly.
Structured data is a machine-readable description of what a page represents. JSON-LD is one way to publish that data, and in practice it is often the easiest way to keep the markup separate from the HTML structure that users see.

When implemented accurately, structured data can help Google and other consumers understand page type, entities, and relationships more clearly. On the Google side, some supported types can make a page eligible for richer search presentations such as breadcrumbs, article details, product information, or event details.
What Is JSON-LD?
JSON-LD stands for JavaScript Object Notation for Linked Data. Unlike Microformats and Microdata, JSON-LD is not embedded into your HTML elements. Instead, it sits in a dedicated script block—completely separated from your HTML content.
JSON-LD has gained prominence as Google’s recommended format because it simplifies implementation and maintenance, reducing the likelihood of errors when updating your website.
bonusInteresting fact: JSON-LD was developed by the W3C, the same organization behind many web standards we use daily, including HTML and CSS.
It’s part of the broader semantic web initiative, aiming to make the internet more machine-readable while maintaining human-friendly interfaces.
How JSON-LD Works
JSON-LD provides context through a simple, readable format that both humans and machines can understand:
Script Placement
Separate Script Block: You place a <script type="application/ld+json"> block in your HTML document, usually in the head or just before the closing body tag.
JSON Format: Inside that script block, you write out your structured data in pure JSON, referencing recognized vocabularies like Schema.org.
Decoupled from Presentation: Since the data is separate from your HTML, it’s easier to maintain and update.
The Anatomy of JSON-LD
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Person",
"name": "Jane Doe",
"url": "http://janedoe.com",
"jobTitle": "Software Engineer",
"worksFor": {
"@type": "Organization",
"name": "Tech Company"
},
"sameAs": [
"https://www.linkedin.com/in/janedoe",
"https://twitter.com/janedoe"
]
}
</script>Let’s break down the key components:
@context: Defines the vocabulary being used (typically schema.org)@type: Specifies what kind of entity you’re describing- Properties: Name-value pairs that describe attributes of the entity
- Nested objects: For representing complex relationships
Pros of JSON-LD
- Clean Markup: Your HTML stays uncluttered, as the structured data is stored separately.
- Ease of Maintenance: Updating your structured data is as simple as editing a JSON file.
- Implementation Friendly: Google’s current docs recommend JSON-LD when your setup allows it because it is usually easier to implement and maintain.
- Dynamic Generation: Easier to generate programmatically compared to inline formats.
- Less Prone to Errors: Changes to your HTML won’t accidentally break your structured data.
Cons of JSON-LD
- Learning Curve: If you’re not familiar with JSON, there might be a small learning curve.
- Separate Management: You need to ensure your structured data stays in sync with your visible content.
JSON-LD vs Other Structured Data Formats
Understanding how JSON-LD compares to other structured data formats helps explain why it has become the preferred choice:
| Feature | JSON-LD | Microdata | RDFa |
|---|---|---|---|
| Implementation | Separate script block | Inline HTML attributes | Inline HTML attributes |
| Complexity | Low | Medium | High |
| Maintenance | Easy | Difficult | Difficult |
| HTML Impact | None | Modifies HTML | Modifies HTML |
| Google Preference | Recommended | Supported | Supported |
| Learning Curve | Moderate | Moderate | Steep |
tipWhile Google supports all three formats, they’ve publicly stated their preference for JSON-LD due to its ease of implementation and lower risk of markup errors.
Microdata Example
<div itemscope itemtype="https://schema.org/Person">
<span itemprop="name">Jane Doe</span>
<span itemprop="jobTitle">Software Engineer</span>
<div itemprop="worksFor" itemscope itemtype="https://schema.org/Organization">
<span itemprop="name">Tech Company</span>
</div>
</div>As you can see, Microdata intertwines with your HTML structure, making it more difficult to maintain and update compared to the clean separation offered by JSON-LD.
Implementing JSON-LD on Your Website
Adding JSON-LD to your website is straightforward. Here’s how to get started:
Basic Implementation Steps
- Determine what entity types and properties are relevant for your content
- Create your JSON-LD script following Schema.org vocabulary
- Place the script in your HTML’s
<head>section or before the closing</body>tag - Test using Google’s Rich Results Test tool
- Monitor performance in Google Search Console
Common Schema Types
Different types of pages require different schema types:
For Articles and Blog Posts:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "Using JSON-LD to improve website SEO",
"image": "https://yoursite.com/images/article-image.jpg",
"author": {
"@type": "Person",
"name": "Your Name"
},
"publisher": {
"@type": "Organization",
"name": "Your Publication",
"logo": {
"@type": "ImageObject",
"url": "https://yoursite.com/logo.png"
}
},
"datePublished": "2024-02-14",
"dateModified": "2024-02-20"
}
</script>For Local Business:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "LocalBusiness",
"name": "Awesome Coffee Shop",
"image": "https://yoursite.com/images/coffee-shop.jpg",
"address": {
"@type": "PostalAddress",
"streetAddress": "123 Main St",
"addressLocality": "San Francisco",
"addressRegion": "CA",
"postalCode": "94122",
"addressCountry": "US"
},
"telephone": "+14155552671",
"openingHoursSpecification": [
{
"@type": "OpeningHoursSpecification",
"dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
"opens": "08:00",
"closes": "18:00"
}
]
}
</script>What JSON-LD Can Actually Help With
Implemented accurately, JSON-LD can help in three practical ways:
Clearer page and entity meaning
It gives search engines and other consumers a more explicit description of the page type, the entities on the page, and how they relate to each other.
Eligibility for supported search enhancements
For the right content types and current Google feature docs, JSON-LD can make a page eligible for richer search presentations such as breadcrumbs, article details, product information, or event details.
Eligibility is not display.
More maintainable structured data at scale
The biggest day-to-day win is operational. It is usually easier to generate one well-scoped JSON-LD block from template data than to scatter equivalent markup through the DOM.
Best Practices for JSON-LD
Follow these guidelines to get the most out of your JSON-LD implementation:
Be Specific and Accurate
- Use the most specific type possible (e.g., “MedicalClinic” instead of just “LocalBusiness”)
- Ensure all information exactly matches what’s visible on the page
- Add the properties that accurately describe the visible content, then validate against the current Google docs for the feature you care about
- Add recommended properties whenever possible
Keep It Relevant
- Only include schema types that relate directly to your main content
- Don’t mark up content that’s not visible to users
- Focus on quality over quantity of markup
Use Nested Entities Effectively
- Create relationships between entities using nested objects
- Link to existing entities using @id references
- Use consistent identifiers across your website
Multiple Entity Types
For pages that represent multiple entities, you can include multiple script blocks:
<!-- Person schema -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Person",
"name": "John Smith"
}
</script>
<!-- Article schema -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "Article Title"
}
</script>Common Mistakes to Avoid
Even experienced developers can make these common JSON-LD errors:
Technical Mistakes
- Invalid JSON syntax
- Confusing Schema.org validity with Google feature requirements
- Using incorrect property types
- Forgetting to update structured data when page content changes
Conceptual Mistakes
- Marking up invisible content
- Using overly generic schema types
- Implementing irrelevant schema types
- “Keyword stuffing” in structured data
importantGoogle may issue manual actions against sites that use structured data in manipulative or deceptive ways, so always follow their guidelines.
Testing and Validating Your JSON-LD
Before deploying your JSON-LD, always validate it using these tools:
Google’s Rich Results Test: https://search.google.com/test/rich-results(opens in new tab)
Schema.org Validator: https://validator.schema.org/(opens in new tab)
JSON-LD Playground: https://json-ld.org/playground/(opens in new tab)
Regular testing ensures your structured data remains valid as your website evolves.
Tools and Resources
Tools
noteWill be updated in next revision.
Learning Resources
- Google’s Guidelines(opens in new tab)
- Schema.org Full Hierarchy(opens in new tab)
- JSON-LD Community Group(opens in new tab)
Final Thoughts
JSON-LD is easiest to justify when you stop treating it like an SEO hack and start treating it like implementation plumbing that needs to stay accurate.
If the markup matches the visible page, uses the right vocabulary, and follows the current Google docs for any feature you actually care about, it can be a very clean way to publish structured data at scale.
Getting Started Today
- Start with the most important pages on your site
- Add only the types that match the visible content honestly
- Validate with both Google’s Rich Results Test and validator.schema.org
- Keep the markup wired to the same source data as the page itself
- Re-check the Google docs whenever you touch feature-specific markup
Structured data implementation is not a one-time task. The syntax can stay stable while Google’s supported features keep moving.
This page now works best as the implementation companion in my structured-data cluster. For the foundations and adjacent guides, continue with What is JSON-LD?, JSON-LD Examples, Schema.org for Developers, and Structured Data Formats Compared.





