How to Test Open Graph Tags
Step-by-step guide to testing and validating Open Graph meta tags using platform debuggers, CLI tools, and our free OG Inspector.
Deploying Open Graph tags without testing is one of the most common mistakes developers make. Social platforms cache preview data aggressively — once a bad preview is cached, fixing it requires manual cache invalidation on every platform separately.
This guide covers every testing method available in 2026.
1. Open Graph Inspector (Multi-Platform)
Our free Open Graph Inspector scrapes any URL and shows you exactly how the preview card renders across Facebook, LinkedIn, Twitter/X, Discord, WhatsApp, Slack, and Telegram simultaneously.
It also runs a detailed audit checking for:
- Missing required tags (
og:title,og:image,og:url,og:type) - Image dimension validation
- URL canonicalization issues
- Character length warnings for titles and descriptions
This is the fastest way to validate your OG implementation before sharing links publicly.
2. Platform-Specific Debuggers
Facebook Sharing Debugger
- URL: developers.facebook.com/tools/debug
- Enter your URL and click Debug to see what Facebook’s crawler sees.
- Click Scrape Again to force-refresh cached metadata.
LinkedIn Post Inspector
- URL: linkedin.com/post-inspector
- Enter your URL and click Inspect.
- LinkedIn will re-crawl your page and display the updated preview.
Twitter/X Card Validator
- Twitter discontinued its public Card Validator tool. To test Twitter cards, compose a tweet with your URL in the tweet editor — the preview card renders in the compose window before posting.
- Alternatively, use our Open Graph Inspector which simulates X’s rendering.
3. Command-Line Testing With curl
You can inspect your OG tags directly from the terminal without any GUI tools:
curl -s https://example.com | grep -i 'og:'
This outputs all OG meta tags from the page’s HTML source. For a more structured view:
curl -s https://example.com | grep -oP 'property="og:[^"]*" content="[^"]*"'
Simulating Social Crawlers
To test how your server responds to social media crawlers specifically, send requests with their user-agent strings:
# Facebook
curl -A "facebookexternalhit/1.1" https://example.com
# LinkedIn
curl -A "LinkedInBot/1.0" https://example.com
# Twitter
curl -A "Twitterbot/1.0" https://example.com
If your server returns different HTML to bots (e.g., a JavaScript SPA without SSR), this will immediately reveal the problem.
4. Browser DevTools
Open your page in Chrome, right-click, and select View Page Source (not Inspect Element). Search for og: to verify that your OG tags are present in the raw HTML source.
This is critical for JavaScript frameworks: if your OG tags are rendered client-side, they won’t appear in the page source — and social crawlers won’t see them either.
5. Testing Checklist
Before marking your OG implementation as complete, verify:
-
og:titleexists and is under 60 characters -
og:descriptionexists and is 100–150 characters -
og:imageuses an absolute HTTPS URL -
og:imagereturns HTTP 200 (not 301 redirect or 404) -
og:imagedimensions are at least 1200×630 px -
og:imagefile size is under 5 MB -
og:urlmatches the canonical URL -
og:typeis set (websiteorarticle) - No duplicate OG tags (except intentional arrays)
- Tags render in server-side HTML (not client-side only)
When Tags Don’t Update After Changes
If you’ve fixed your OG tags but platforms still show old previews, read our Open Graph Troubleshooting Guide and How to Fix Missing Link Previews on LinkedIn & WhatsApp.
Related Resources
- Open Graph Troubleshooting Guide
- Twitter Card Not Showing? How to Fix It
- Social Preview Simulator — Preview OG cards across all platforms