Link Code Generator Logo
Link Code Generator

Free Open Graph Tag Generator & Preview Tool

Generate correct Open Graph and Twitter Card meta tags for any URL. Preview how your page will look when shared on Facebook, Twitter, and LinkedIn.

Recommended: 40-60 characters

0/60

Recommended: 50-160 characters

0/160

Recommended size: 1200 x 630 pixels.

Define your page details to visualize how your link will unfurl on social media.

What Is the Open Graph Protocol?

The Open Graph (OG) protocol was created by Facebook in 2010 to standardize how web pages are represented when shared on social networks. When you paste a URL into Facebook, LinkedIn, Twitter, Slack, or any other platform, those apps look for og: meta tags in the page's HTML <head> to decide what title, description, and image to display in the link preview card.

Without OG tags, social platforms have to guess - and they often pick the wrong image (a logo, an ad pixel, a tiny icon) or pull a truncated, irrelevant description. A well-crafted OG image can increase click-through rates by 3x or more compared to links with missing or broken previews.

The Five Core Open Graph Tags

  • og:title: The title of your page as it should appear in the link preview. Usually the same as or a variation of your page's <title> tag. Aim for 40 - 60 characters.
  • og:description: A 1 - 2 sentence description of the page content. Aim for 50 - 160 characters. Write it as a compelling summary, not a keyword dump.
  • og:image: The image URL for the preview card. Recommended size: 1200 × 630 pixels at a 1.91:1 aspect ratio. Must be an absolute URL (not a relative path). Use a high-contrast, visually clear image - avoid small text in the image.
  • og:url: The canonical URL of the page. Helps social platforms de-duplicate cache entries and ensures the share count is attributed to the correct URL.
  • og:type: The type of content: website for general pages, article for blog posts, product for e-commerce items, profile for user profiles.

Twitter Card Tags

Twitter (X) uses its own twitter: meta tags in addition to or instead of OG tags. The most important is twitter:card, which controls the card style. summary_large_image displays a large image above the tweet text - this format consistently performs better than the default summary card. This tool generates both OG and Twitter tags together, aligned correctly.

How to Test Your OG Tags

After publishing your page with OG tags, test with platform-specific debugging tools. Also make sure to use our Social Share Link Generator to create custom sharing buttons that direct users to share your page:

Frequently Asked Questions

Why is the wrong image showing when I share my link?

Social platforms heavily cache OG data. Even after adding correct OG tags, old previews may persist for days. Use the platform's sharing debugger tools (Facebook Sharing Debugger, LinkedIn Post Inspector) with their "Force Refresh" option to clear cached data and re-crawl your page immediately.

Do OG tags affect my Google SEO rankings?

Not directly. Google does not use OG tags as a ranking signal. However, they indirectly impact SEO through click-through rates: links with compelling images and titles get more clicks when shared on social media, which drives referral traffic. Higher CTR in Google Search results is also a positive ranking signal.

What size should my OG image be?

The recommended size is 1200 × 630 pixels (1.91:1 aspect ratio). Facebook, Twitter, and LinkedIn all support this size correctly. Minimum: 600 × 315px. The image file should be under 8MB for Facebook. Use JPG for photographs and PNG for images with text or graphics.

Developer tools delivered free

Deep link guides, Open Graph tips, and new dev tools - straight to your inbox.