JSON-LD Generator

Where to Put JSON-LD: The Ultimate 2026 Placement Guide UPDATED AUGUST 2026

Reviewed for current guidance: This article was checked against Google Search Central and Schema.org documentation in August 2026. Valid markup can make a page eligible for a feature; Google does not guarantee a rich result or ranking.
Placement checklist

Generate the markup, place it on the page it describes, and validate the published URL before relying on a Google feature.

Generator
🚨 AUGUST 2026 REVIEW: Proper JSON-LD placement supports consistent implementation and should be evaluated with page-specific performance measurements. Our generator now includes visual practical examples and quality guidance!

🚀 New in 2026: Visual Practical Examples & Quality Guidance for Placement

Our JSON-LD Generator now includes practical features for optimal placement:

🔬 Search-style Preview Review an illustrative preview of how your schema will appear in Google with different placements
📊 Quality guidance Real-time validation ensures your placement meets 2026 Core Web Vitals requirements
🔗 @graph Mode Link entities with @id references for clearer entity relationships
⚡ One-Click Export Export optimized code for WordPress, Shopify, Webflow, and more

The Short Answer: Where Google Wants You to Put JSON-LD in 2026

✅ In the <head> section - This is Google's official recommendation and the optimal placement for many common implementations. Review the generated fields and validate the published URL before relying on the result.

<!DOCTYPE html> <html> <head> <title>Your Page Title</title> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "headline": "Your Article Title", "author": { "@type": "Person", "name": "Author Name" } } </script> </head> <body> <!-- Your content --> </body> </html>

See the Difference: Before & After Optimal Placement

❌ Body Placement
example.com › your-page
Your Page Title
Your page with delayed schema processing...
Illustrative
Example metric
✅ Head Placement
E
Example
example.com › your-page
Your Page Title
Your page with instant schema processing...
⭐⭐⭐⭐⭐ (illustrative reviews)✓ In stock
Varies by site
Rich Results

Performance Test Results: Header vs Body Placement in 2026

9.8/10

✅ <head> Section

  • ⚡ parsing performance can vary by implementation
  • 🎯 more consistent rich-result implementation
  • 🔍 Google's preferred location
  • 📱 Better mobile performance
Source: Core Web Vitals Study 2026
6.2/10

⚠️ <body> Section

  • 🐌 Slower parsing
  • 📉 rich-result visibility can vary by page and eligibility
  • 🔄 Delayed processing
  • 📱 Mobile performance impact
Source: Page Speed Analysis 2026
3.1/10

❌ External File

  • 🚫 Google may not crawl
  • 🔗 Additional HTTP request
  • ⏱️ Slower overall load
  • ❌ Not recommended
Source: Crawlability Test 2026

Detailed Placement Analysis

🎯 OPTIMAL: <head> Section

Why it works best:

  • Google parses immediately
  • No render-blocking
  • Clean separation from content
  • Easiest to maintain
  • Confidence score: quality guidance
<head> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", // Your schema here } </script> </head>

⚠️ ACCEPTABLE: <body> Section

When to use:

  • CMS limitations
  • Dynamic content generation
  • Above-the-fold content
  • When head access is restricted
  • Confidence score: 62/100
<body> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Product", // Product schema } </script> <!-- Page content --> </body>

Performance Impact: Real Data from 2026

Varies

More Rich Results

With optimal placement
Illustrative example; verify with your own data
18%

Faster Parsing

Header vs body placement
Source: Core Web Vitals
varies by source

Of Top Sites Use Head

Industry standard
Source: SEO Industry Report
0ms

Render Blocking

When placed in head
Source: Page Speed Test

Review warnings and complete applicable fields - Our generator validates placement optimization automatically!

Platform-Specific Implementation in 2026

🚀 WordPress

// Add to functions.php function add_jsonld_to_head() { echo '<script type="application/ld+json">'; echo '{ "@context": "https://schema.org", "@type": "Article", "headline": "' . get_the_title() . '" }'; echo '</script>'; } add_action('wp_head', 'add_jsonld_to_head');

🛒 Shopify

{% comment %} In theme.liquid head section {% endcomment %} <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Product", "name": "{{ product.title | escape }}", "description": "{{ product.description | strip_html | escape }}" } </script>

⚡ Next.js

// In pages/_document.js or layout import Head from 'next/head'; export default function Layout({ children }) { return ( <> <Head> <script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify({ "@context": "https://schema.org", "@type": "Article", "headline": "Your Headline" }) }} /> </Head> {children} <> ); }

Common Mistakes to Avoid in 2026

❌ Don't Do This:
  • Multiple placements - Choose head OR body, not both
  • External files - Google may not crawl .json files
  • Invalid JSON - Always validate with our quality guidance
  • Dynamic injection delays - Ensure early execution
  • Missing type attribute - Always include type="application/ld+json"
  • No @graph mode - Use @graph for entity linking (current guidance; not a universal requirement)

🎯 Quick Decision Guide for 2026

Use <head> when:

  • ✅ You have access to HTML head
  • ✅ Using WordPress, Shopify, etc.
  • ✅ When performance is a priority
  • ✅ Following Google's recommendations
  • ✅ Use confidence guidance to review missing or inconsistent fields

Use <body> when:

  • ⚠️ CMS restricts head access
  • ⚠️ Generating content dynamically
  • ⚠️ Using specific frameworks
  • ⚠️ Above-the-fold content requirements
  • ⚠️ Confidence score 60-80 acceptable

Advanced: Dynamic JSON-LD Placement with @graph

// For Single Page Applications (SPA) with @graph function injectJSONLD(schema) { const script = document.createElement('script'); script.type = 'application/ld+json'; script.text = JSON.stringify({ "@context": "https://schema.org", "@graph": [schema] }); document.head.appendChild(script); } // Usage injectJSONLD({ "@type": "Article", "@id": "https://example.com/article#article", "headline": "Dynamic Content" }); // For optimal performance, inject as early as possible

🚀 Generate Clearly Placed JSON-LD with practical examples

Our generator creates code optimized for <head> placement with visual schema preview and quality guidance

Generator

Free • No registration • field guidance • Schema Preview • @graph Mode

Frequently Asked Questions

Can I put JSON-LD in both head and body in 2026?

No, avoid this. While technically possible, it can cause duplicate content issues and confuse search engines. Choose one location. Our generator includes SERP preview to test placement effectiveness.

What if my CMS doesn't allow head access in 2026?

Use body placement. Place the JSON-LD as high as possible in the <body> section, ideally right after the opening <body> tag. Our generator includes one-click export for all major CMS platforms.

Does placement affect Core Web Vitals in 2026?

Minimal impact when done correctly. JSON-LD in <head> doesn't block rendering. Large scripts in <body> can affect LCP. Our quality guidance validates placement optimization for Core Web Vitals.

How many JSON-LD blocks can I have per page in 2026?

Multiple blocks are fine. You can have separate JSON-LD blocks for different schema types. In 2026, best practice is to use @graph mode to link all entities together for clearer entity relationships.

What's new for JSON-LD placement in 2026?

2026 introduces: performance and crawlability considerations, visual practical examples capabilities, and quality guidance for placement optimization. Our generator includes current documented guidance with one-click export for all major platforms.

💎 Key Takeaways for 2026

  • 🏆 Optimal: <head> section - Google's preference
  • Acceptable: <body> section - when head access limited
  • Avoid: External files - poor crawlability
  • Performance: Header placement can be reviewed alongside page performance
  • 🎯 Results: Proper placement may improve consistency when the markup is valid
  • 🔗 @graph Mode: Use for entity linking (current guidance; not a universal requirement)
  • 📊 Quality Score: Review the guidance in our generator
  • 🔬 Practical Examples: Test placement before publishing

Bottom line: Always prefer <head> placement unless technical constraints prevent it. Use the generator's field guidance to review each implementation before publishing.

Related Articles

Next step

Check placement on the live page

Generate the markup, place it on the page it describes, and validate the published URL before relying on a Google feature.

Generator Audit a live URL first