Generate Open Graph (OG) and Twitter Card meta tags to control exactly how your content appears when shared on Facebook, Twitter/X, LinkedIn, Pinterest, and other social platforms. Copy-paste ready HTML code.
Open Graph (OG) tags are a protocol originally created by Facebook that allows web pages to control how their content appears when shared on social media. When you share a link on Facebook, LinkedIn, or other platforms, the platform reads the OG tags to determine what title, description, image, and URL to display in the share card.
Without Open Graph tags, social platforms try to guess which image and text to show — often resulting in broken previews, wrong images, or truncated descriptions. With proper OG tags, you have full control over how your content is presented to every person who sees it shared.
The title displayed in the social share card. This can be different from your HTML <title> tag. Best practices:
og:site_name tag handles branding).The description shown below the title in the share card. Keep it between 100–200 characters. Write it as a hook that makes people want to click through. Unlike meta descriptions, OG descriptions have more flexibility since they're optimized for social engagement rather than search engines.
The image is the most impactful element of a social share card — it takes up the most visual space and drives the most clicks. Guidelines:
The canonical URL of the shared content. This should be the clean, canonical version of the URL (no tracking parameters, no www, no trailing slash). When multiple shares of the same content use different URLs, the og:url consolidates social signals to one URL.
Tells platforms what kind of content is being shared. Common types:
The name of your website or brand. Displayed alongside the URL in share previews. Keep it short and recognizable — your brand name, not a tagline.
Twitter/X uses its own card system that works alongside Open Graph tags. When Twitter Card tags are present, they take priority over OG tags. When they're absent, Twitter falls back to OG tags.
Two main card types:
Your Twitter/X handle (e.g., @costzap). This attributes the card to your account and can help drive followers.
After adding OG tags, use these official tools to verify they work correctly:
Social platforms cache OG data aggressively. After updating your tags, use these debugger tools to force a cache refresh — otherwise the old preview may display for days.
Meta Tag Generator — HTML meta tags for SEO | Robots.txt Generator — Crawler control | Keyword Density Checker — Content optimization
Open Graph tags control how your web pages appear when shared on social media. They define the title, image, description, and URL shown in share previews on Facebook, LinkedIn, Twitter/X, WhatsApp, Slack, Discord, and other platforms that support the Open Graph protocol.
The recommended OG image size is 1200×630 pixels (1.91:1 aspect ratio). This works well across all major platforms. Minimum size is 600×315px for Facebook large image previews. Always use high-quality JPEG or PNG under 8MB.
Open Graph tags do not directly affect Google search rankings. However, they indirectly improve SEO by increasing social sharing, driving referral traffic, improving brand visibility, and generating social signals. A well-crafted OG image and title can dramatically increase share rates and clicks.
Open Graph is a protocol by Facebook used by most social platforms. Twitter Cards are Twitter's own system. When both are present, Twitter prioritizes its own tags. When Twitter Card tags are absent, Twitter falls back to Open Graph tags. For maximum compatibility, include both sets.
Use Facebook's Sharing Debugger tool to see how Facebook renders your URL. Use Twitter's Card Validator for Twitter previews. Use LinkedIn's Post Inspector for LinkedIn shares. These tools also let you force a cache refresh after updating your tags.
Yes. Your HTML <title> tag is for search engines, while og:title is for social sharing. They can be completely different. This lets you write keyword-optimized titles for Google and more engaging, curiosity-driven titles for social platforms.