Open Graph & Twitter Card Generator

  • Free, no sign-up
  • Runs in your browser
  • Updated
Quick answer. The Open Graph Generator builds og: and twitter: meta tags from a simple form and shows generic previews of how your link may look when shared on Facebook, X, LinkedIn and WhatsApp.

Open Graph & Twitter Card Generator tool

Image preview
example.com
Your page title
Your description appears here.

Generic previews for guidance only. Each platform crops and styles links in its own way.

Runs in your browser. Your data never leaves your device.

How to use the Open Graph & Twitter Card Generator

  1. 1Enter the page title, description, URL and the address of a share image.
  2. 2Choose the content type (website or article) and the Twitter card type.
  3. 3Compare the generic social previews and adjust your text.
  4. 4Copy the HTML into the <head> of your page.

What is an Open Graph generator?

An Open Graph generator creates the meta tags that control how your page looks when someone shares its link on social media or in chat apps. This tool builds both Open Graph (og:) tags, used by Facebook, LinkedIn, WhatsApp and many others, and Twitter Card (twitter:) tags used by X, then shows generic previews in four common styles.

Without these tags, apps guess. They might pick a random image from your page, or show no image at all, and the link gets fewer clicks.

How do Open Graph tags work?

The Open Graph protocol was created by Facebook in 2010. When a link is shared, the platform's crawler downloads the page and reads <meta property="og:…"> tags in the <head>. The four basic tags are:

TagPurpose
og:titleThe headline of the preview card
og:typeThe kind of content, usually website or article
og:imageThe full URL of the preview image
og:urlThe canonical URL of the page

This generator also adds og:description, og:site_name and image width and height. Stating the size lets some apps show the image on the first share instead of waiting to download it.

X reads its own twitter:card tag to choose the layout. summary_large_image shows a big image above the title; summary shows a small square thumbnail. If twitter:title or twitter:image is missing, X falls back to the Open Graph values, as described in X's developer documentation.

What size should the share image be?

Use 1200 × 630 pixels, a 1.91:1 ratio. This size works well on Facebook, LinkedIn and X large cards. Keep text and faces near the centre, because WhatsApp and some apps crop the image to a square or a smaller rectangle. Keep the file under about 1 MB so it loads quickly. You can get exact dimensions with the Image Resizer.

Worked example

You are sharing a blog post on a Karachi food site. You fill in:

  • Title: 10 Best Nihari Spots in Karachi (Tested in 2026)
  • Description: We ate at 25 nihari places across Karachi. Here are the 10 we would go back to, with prices and timings.
  • URL: https://karachifood.pk/best-nihari/
  • Image: https://karachifood.pk/og/nihari.jpg
  • Type: article, card: summary_large_image

The generator outputs:

<meta property="og:type" content="article">
<meta property="og:title" content="10 Best Nihari Spots in Karachi (Tested in 2026)">
<meta property="og:description" content="We ate at 25 nihari places across Karachi. Here are the 10 we would go back to, with prices and timings.">
<meta property="og:url" content="https://karachifood.pk/best-nihari/">
<meta property="og:image" content="https://karachifood.pk/og/nihari.jpg">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="10 Best Nihari Spots in Karachi (Tested in 2026)">
...

Switch between the Facebook, X, LinkedIn and WhatsApp preview styles to check the title fits and the image crop works.

Tips

  1. Use absolute image URLs starting with https://. Relative paths like /og.jpg are often ignored.
  2. Make the image readable when small. Big, simple text and high contrast work best on phones.
  3. Write a title for humans. Social titles can be a little more conversational than search titles.
  4. Track shared links. Add UTM tags with the UTM Link Builder to see which network sends visitors.
  5. Add search tags too. Pair these with a title and description from the Meta Tag Generator.

Why doesn't my new image show up?

Social platforms cache previews, sometimes for days. After you change tags, use the platform's own tool (such as Facebook's Sharing Debugger or LinkedIn's Post Inspector) to ask it to fetch the page again. Also check that the image URL opens in a private browser window and is not blocked by robots.txt or a login.

Limitations

The previews here are generic styles, not exact copies of each app. Real cards differ by device, app version and dark mode, and platforms change their designs often. This tool cannot check whether your server is reachable by social crawlers or whether your image URL works. For other structured information about your page, see the Schema Markup Generator, and check search appearance with the SERP Snippet Preview.

Frequently asked questions

What size should an Open Graph image be?

1200 × 630 pixels (a 1.91:1 ratio) works well on most platforms. Keep important text away from the edges because some apps crop the image.

Do I need both Open Graph and Twitter tags?

X falls back to Open Graph tags when twitter: tags are missing, but twitter:card is still needed to choose the large image layout.

Why does my old preview still show after I changed the tags?

Social networks cache previews. Use the platform’s own debugging or post inspector tool to refresh the cache.

Must the image URL be absolute?

Yes. Use a full https:// address. Relative paths are often ignored by social crawlers.

Last updated: . Written and tested by Abdul Moid Khan, ATechCraft. Read how we build and test tools.