SEO

Open Graph Generator

Details

How to use Open Graph Generator

What the tool does, how to run it, and what to expect from the result.

How to generate Open Graph tags

Open Graph tags control the preview card that appears when your page is shared on Facebook, LinkedIn, Slack, WhatsApp, iMessage, and most other platforms. Without them, the platform guesses, and it usually guesses badly.

The tags are generated in your browser and belong in the head of your document, in the HTML the server sends rather than added later by JavaScript, because social scrapers do not run scripts.

  • Enter the title and description, which are what the card will display.
  • Enter the page URL and the image URL, making sure the image URL is absolute and begins with https.
  • Choose the og:type, using website for most pages and article for a blog post.
  • Copy the generated tags into the head of your page and deploy.
  • Test the live URL in Facebook's Sharing Debugger and LinkedIn's Post Inspector, which will also force a fresh scrape if you have changed the image.
Tips

Getting a better result out of Open Graph Generator

Specific settings and thresholds, not general advice.

  • og:image must be an absolute URL with the scheme included. A relative path such as /og.jpg silently produces no preview at all, and this is by a wide margin the most common Open Graph bug.
  • Size the image at 1200 by 630 pixels, which is the 1.91:1 ratio Facebook and LinkedIn expect and which Twitter's summary_large_image card also handles well. Below 200 pixels on either side, the platforms will refuse it and fall back to no image.
  • Social scrapers cache aggressively and do not come back on their own. If you change an image after the URL has been shared, the old one will keep appearing until you force a refresh in Facebook's Sharing Debugger or LinkedIn's Post Inspector. Publishing the new image under a new filename is the reliable way to bust the cache.
  • Crawlers do not run JavaScript. If your Open Graph tags are injected client-side by a framework after hydration, the scraper sees an empty head and your preview is blank. The tags must be in the HTML that the server sends.
  • The image must be reachable without authentication and must not be blocked in robots.txt. A staging site behind a login, or an assets directory that a well-meaning robots rule disallowed, produces a preview with no image and no error message anywhere.
Limits

What Open Graph Generator does not do

The honest boundary, so you do not lose time finding it yourself.

  • It does not emit og:image:width and og:image:height, which let a platform reserve the layout space before the image has downloaded.
  • It does not generate the article-specific properties such as published time, author, and section, which og:type article is meant to accompany.
  • It supports a single image, so you cannot offer a platform a choice of several.
  • It does not generate og:video or the alternate locale properties for multi-language pages.
Reference

Terms used on this page

Short, plain-language definitions for the formats and settings above.

At a glance

Who Open Graph Generator is for

A quick way to understand who this helps, what it solves, and where it connects next.

Best fit

Developers, marketers, and site owners handling on-page SEO.

Ideal for

Generating correct SEO snippets without writing them by hand.

FAQ

Common questions

Short answers for the questions people usually have before trying a utility like this.

My preview shows no image. What is wrong?

Check three things in this order. First, is the og:image value an absolute URL beginning with https, because a relative path never works. Second, can the image be fetched by a stranger with no cookies, since a staging site behind basic auth or an image directory disallowed in robots.txt will fail silently. Third, are the tags present in the HTML the server returns, rather than added later by JavaScript, because scrapers do not execute scripts. One of those three accounts for nearly every blank preview.

I updated my image but the old one still appears. Why?

Because the platform cached it when the URL was first shared, and it has no reason to check again. Facebook, LinkedIn, and Slack all keep a scraped copy for a long time. Each has a debugging tool that forces a re-scrape: the Sharing Debugger for Facebook, the Post Inspector for LinkedIn. The approach that always works, and that you should prefer for anything important, is to publish the new image at a new URL, since a URL that has never been scraped cannot have a stale cache.

What size should the image be?

1200 by 630 pixels is the answer for almost every case. It matches the 1.91:1 ratio that Facebook and LinkedIn use, and Twitter's large summary card crops it acceptably. Keep the file under about 5 MB, well under in practice, and put any important text in the middle, because different platforms crop the edges differently. Anything smaller than 200 pixels on a side will be rejected outright and you will get no image at all.

Do I need Twitter card tags as well as Open Graph tags?

Only for the parts that differ. X falls back to the Open Graph tags when the Twitter-specific ones are missing, so og:title, og:description, and og:image are enough to produce a card. What you do need to state explicitly is twitter:card, because that chooses the layout, and summary_large_image is what gives you the big image rather than a small thumbnail. Adding twitter:site with your handle earns the attribution line.

Is my page data sent anywhere?

No. The tags are built in your browser from what you type. Nothing about an unreleased page title, URL, or image is transmitted or stored.

Recommendations

You Might Also Like

Nearby tools from the catalog that fit the same job or workflow.

Cleanor app

Do it all on your device

Cleanor puts these tools in one app: compress and convert images, video, and audio, work with PDFs, and scan text right on your device. Plus free up storage and clear inbox clutter with Email Cleaner. Start with a free trial.

  • iPhone
  • Android
  • Macsoon
  • Windowssoon