Back to Blog
Developer Tools 6 min read

Open Graph Tags: What They Are and How to Get Better Link Previews

The title, description and image people see when your link is shared come from a handful of meta tags. Here's what to set and how to test it.

FreeToolsHubNovember 9, 2026
Open Graph Tags: What They Are and How to Get Better Link Previews

Open Graph tags tell social platforms what to show when your link is shared. Set og:title, og:description, og:image (about 1200×630 pixels), og:url and og:type, add twitter:card for X, then preview the result before you publish.

Free toolOG PreviewerPreview social sharing cards
On this page (6 sections)

When someone pastes your link into a chat or a post, the platform fetches your page and builds a card from its meta tags. If those tags are missing, it guesses, and often picks a random image or no image at all. Setting them takes a few minutes and makes every share look deliberate.

The tags that matter

TagWhat it controlsTip
og:titleThe card's headlineKeep it under about 60 characters
og:descriptionThe line of text below itOne or two sentences
og:imageThe pictureAbout 1200×630 px, full URL
og:urlThe canonical address of the pageMatch your canonical tag
og:typeThe kind of contentwebsite or article
twitter:cardThe card layout on Xsummary_large_image

Example

<meta property="og:title" content="Your Page Title" />

<meta property="og:description" content="A short, clear summary." />

<meta property="og:image" content="https://example.com/preview.jpg" />

<meta name="twitter:card" content="summary_large_image" />

Choosing the image

  • Use about 1200×630 pixels (1.91:1) as a JPG or PNG, with an absolute URL.
  • Put text and faces in the middle, because edges can be cropped.
  • Use a unique image per page where you can. A shared brand image on every page makes links look alike.
  • Resize any picture to the right size with the image resizer.

How to create and test your tags

  1. Generate them. Fill in the meta tag generator with your title, description and image, then copy the code into your page's head.
  2. Preview them. Paste your URL into the Open Graph previewer to see roughly how the card will look on Facebook, LinkedIn, X and WhatsApp.
  3. Refresh caches. If you changed an old link, use the platform's debugger to re-scrape it.

Previews differ

Each platform renders cards in its own way and may crop or truncate differently. A preview tool shows the idea, so check the real thing on the platforms that matter most to you.

Open Graph is for sharing. Search results use your title tag and meta description. As rough guides, keep titles to about 50–60 characters and descriptions to about 140–160, since Google cuts them off by pixel width rather than a fixed count. Write them for a person, with the main keyword near the start.

Checklist

  1. Title, description, image, URL and type are set on every page.
  2. The image is about 1200×630 and loads over HTTPS.
  3. twitter:card is summary_large_image.
  4. You previewed the page before publishing.

Frequently Asked Questions

What are Open Graph tags?

Meta tags in a page's head, introduced by Facebook, that tell platforms which title, description and image to show when the page's link is shared. Most major platforms read them.

What size should an Open Graph image be?

About 1200×630 pixels, a 1.91:1 ratio, as a JPG or PNG. Keep important content away from the edges, since some platforms crop slightly.

Do Open Graph tags affect Google rankings?

Not directly. They control how links look when shared, which affects clicks and engagement. Your regular title tag and meta description are what search results use.

Why doesn't my link preview update after I change the tags?

Platforms cache previews. Use the platform's own debugging tool, such as Facebook's Sharing Debugger, to fetch the page again.

Does X (Twitter) use Open Graph tags?

X uses its own twitter: tags first and falls back to Open Graph. Setting twitter:card to summary_large_image gives the big image card.

SEO Meta Tags Social Media

Related Articles

Tools mentioned in this guide