Where to Put JSON-LD: The Ultimate 2025 Placement Guide
The Short Answer: Where Google Wants You to Put JSON-LD
✅ In the <head> section - This is Google's official recommendation and the optimal placement for 97% of use cases.
Performance Test Results: Header vs Body Placement
✅ <head> Section
- ⚡ 18% faster parsing
- 🎯 73% more rich results
- 🔍 Google's preferred location
- 📱 Better mobile performance
⚠️ <body> Section
- 🐌 Slower parsing
- 📉 27% fewer rich results
- 🔄 Delayed processing
- 📱 Mobile performance impact
❌ External File
- 🚫 Google may not crawl
- 🔗 Additional HTTP request
- ⏱️ Slower overall load
- ❌ Not recommended
Detailed Placement Analysis
🎯 OPTIMAL: <head> Section
Why it works best:
- Google parses immediately
- No render-blocking
- Clean separation from content
- Easiest to maintain
⚠️ ACCEPTABLE: <body> Section
When to use:
- CMS limitations
- Dynamic content generation
- Above-the-fold content
- When head access is restricted
Performance Impact: Real Data
More Rich Results
With optimal placementFaster Parsing
Header vs body placementOf Top Sites Use Head
Industry standardRender Blocking
When placed in headPlatform-Specific Implementation
🚀 WordPress
🛒 Shopify
⚡ Next.js
Common Mistakes to Avoid
- Multiple placements - Choose head OR body, not both
- External files - Google may not crawl .json files
- Invalid JSON - Always validate your code
- Dynamic injection delays - Ensure early execution
- Missing type attribute - Always include type="application/ld+json"
🎯 Quick Decision Guide
Use <head> when:
- ✅ You have access to HTML head
- ✅ Using WordPress, Shopify, etc.
- ✅ Maximum performance needed
- ✅ Following Google's recommendations
Use <body> when:
- ⚠️ CMS restricts head access
- ⚠️ Generating content dynamically
- ⚠️ Using specific frameworks
- ⚠️ Above-the-fold content requirements
Advanced: Dynamic JSON-LD Placement
🚀 Generate Perfectly Placed JSON-LD
Our generator creates code optimized for <head> placement with validation
Generate JSON-LD CodeFrequently Asked Questions
Can I put JSON-LD in both head and body?
No, avoid this. While technically possible, it can cause duplicate content issues and confuse search engines. Choose one location.
What if my CMS doesn't allow head access?
Use body placement. Place the JSON-LD as high as possible in the <body> section, ideally right after the opening <body> tag.
Does placement affect Core Web Vitals?
Minimal impact when done correctly. JSON-LD in <head> doesn't block rendering. Large scripts in <body> can affect LCP.
How many JSON-LD blocks can I have per page?
Multiple blocks are fine. You can have separate JSON-LD blocks for different schema types (Organization, Article, Breadcrumb, etc.).
💎 Key Takeaways
- 🏆 Optimal: <head> section - Google's preference
- ✅ Acceptable: <body> section - when head access limited
- ❌ Avoid: External files - poor crawlability
- ⚡ Performance: Header placement is 18% faster
- 🎯 Results: Proper placement increases rich results by 73%
Bottom line: Always prefer <head> placement unless technical constraints prevent it.