Home / Free tools / Open Graph and Twitter card generator
Open Graph and Twitter card tag generator with preview
Fill in the page details and copy a complete block of Open Graph and Twitter card meta tags, with a live preview and checks for the mistakes that break link previews.
How to use it
- Fill in the page facts. Use the page title, a one-sentence description and the canonical URL.
- Add an absolute https image. About 1200 by 630 pixels; add alt text.
- Copy the tags into your head. Paste them inside the page head element.
- Refresh the cache. Platforms cache previews; use their sharing debuggers after edits.
Why link previews break
When someone shares your URL in a chat or a feed, the app fetches the page and reads og:title, og:description and og:image. Most failures have a dull cause: the image path is relative, the image is served over http, the image is hosted behind a login or bot challenge, or the tags are injected by JavaScript after the page loads, which most preview fetchers do not run.
Image rules of thumb
- 1200 by 630 pixels (about 1.91:1) works across most platforms; keep important text away from the edges.
- Use PNG or JPEG. Some platforms reject WebP or SVG.
- Keep it under a few megabytes and make sure the host does not block unknown user agents.
- Provide
og:image:altfor accessibility.
Do Twitter card tags still matter?
Most platforms fall back to Open Graph if card tags are missing, but declaring twitter:card gives you control over the large-image layout. The generator outputs both. Paired with a clear title from the title and description checker, you cover search and social previews from one set of text.
Worked example
This is what the tool produces for the sample input, so you can see the result without running it.
Input
A five-step guide with photos.
Result
- The page URL should be absolute and use https://.
- The image URL must be absolute and https; relative paths and http often fail to load in previews.
- Add alt text for the image.
Output
<meta property="og:type" content="article"> <meta property="og:site_name" content="Acme Bikes"> <meta property="og:title" content="How to fix a flat tyre"> <meta property="og:description" content="A five-step guide with photos."> <meta property="og:url" content="http://bikes.example/guides/flat"> <meta property="og:image" content="/img/flat.jpg"> <meta name="twitter:card" content="summary_large_image"> <meta name="twitter:title" content="How to fix a flat tyre"> <meta name="twitter:description" content="A five-step guide with photos."> <meta name="twitter:image" content="/img/flat.jpg">
Frequently asked questions
Do I need both og: and twitter: tags?
Many platforms accept Open Graph alone, but twitter:card selects the large-image layout, so including both is safest.
Why does my old preview still show?
Platforms cache previews. Use each platform's sharing debugger to force a refresh.
What size should the image be?
About 1200 by 630 pixels in PNG or JPEG, hosted on https.
Does Open Graph affect search ranking?
Not directly. It controls link previews on social and chat platforms.
More free tools
- Title and meta description length checker: Check title and meta description length in characters and estimated pixels, with a search result preview and plain-language fixes. Free and private.
- Product JSON-LD generator: Generate valid schema.org Product JSON-LD with an Offer: name, image, SKU, brand, price, currency and availability. No fake review fields, by design.
- sitemap.xml generator: Turn a list of URLs into a valid sitemap.xml with lastmod, XML escaping, duplicate removal and host consistency checks. Includes the robots.txt Sitemap line.