Open Graph / Twitter Card Tag Generator
Generate OG tags and Twitter Card tags for better share previews — copy ready-to-paste HTML instantly.
Use the exact public URL you want shared and indexed.
Tip: keep it clear and under ~160 characters.
Preview image
Recommended: a readable 1200×630 image (large text, high contrast).
Twitter Cards
Generated HTML
Paste these tags inside the <head> of your page.
Quick checks
- Use the exact canonical URL (avoid http/https or www/non-www mismatches).
- Use a strong preview image (1200×630 recommended).
- Keep title and description consistent with on-page content.
Open Graph tag generator + Twitter Card tag generator (SEO for social sharing)
Social share previews can change click-through rate. If your site shows the wrong title, missing description, or no image when shared, you typically need Open Graph meta tags and Twitter Card tags. This tool generates the most common OG + Twitter tags and outputs clean HTML you can paste into your page’s <head>.
Need a full checklist and common fixes? Read: Open Graph & Twitter Card Tags – Fix Social Share Previews.
Generating your social preview tags
- Enter the Page URL — the exact canonical URL, including https and your www/non-www choice.
- Write the Title and Description — keep them consistent with what’s actually on the page.
- Choose the Open Graph type (
websitefor homepages and tools,articlefor blog posts) and the Locale (e.g.en_US). - Add the Preview image URL — absolute URL, ideally 1200×630 — plus a short alt description.
- Configure Twitter Cards: card type (
summary_large_imagefor big previews,summaryfor compact), plustwitter:siteandtwitter:creatorhandles. - Click Copy tags and paste everything inside your page’s
<head>.
Open Graph vs. Twitter Cards: who uses what
- Open Graph was created by Facebook and is now the lingua franca of link previews: Facebook, LinkedIn, Discord, Slack, WhatsApp, Telegram, and iMessage all read
og:title,og:description, andog:image. - Twitter Cards are X/Twitter’s own system. If
twitter:tags are missing, X falls back to your Open Graph tags — which usually works, but you lose control over the card style and attribution. - Why generate both? One paste covers every major platform with no per-network fiddling. The few extra lines are cheap insurance.
The preview image: where most people go wrong
- Size: 1200×630 pixels is the widely recommended canvas for large cards — big enough to stay sharp on retina displays.
- Absolute URLs only:
https://yoursite.com/og.png, not/og.png— crawlers fetch the image without your page’s context. - Design for small: the image often renders at a few hundred pixels wide. Large type, high contrast, minimal detail — treat it like a billboard, not a brochure.
- Add alt text:
og:image:altandtwitter:image:altdescribe the image for screen readers and for platforms that show text when images fail. - One image per page: a generic site-wide image is fine as a fallback, but per-page images dramatically outperform it.
Common preview problems this fixes
- Wrong title or stale description: usually missing or duplicated OG tags — generating a fresh, page-specific set solves it.
- No image (grey box): almost always a relative image URL, a blocked image host, or an image smaller than the platform’s minimum.
- http/https or www mismatches: the canonical URL in your tags must match the URL people actually share, or platforms treat them as different pages.
- “I fixed the tags but nothing changed”: previews are cached aggressively. Bust the cache with Facebook’s Sharing Debugger or X’s Card Validator after every fix, then test with a fresh share.
Type, locale, and card-style details
og:type tells platforms what kind of content they’re previewing: website for homepages, tools, and landing pages; article for blog posts and news (which unlocks publish-time metadata on some platforms). The locale tag (en_US format: language_COUNTRY) helps platforms pick the right language variant. For Twitter, summary_large_image gives you the big banner-style preview most marketers want; summary is the compact thumbnail variant. The twitter:site handle attributes the card to your brand, while twitter:creator credits the individual author.
Privacy note
Like everything on this site, tag generation happens entirely in your browser. The URLs and titles you enter are never sent anywhere — they stay on the page until you copy the output.
Best practices to improve previews
- Use a unique title and description that matches the page content.
- Use a single canonical URL format (avoid duplicates across environments).
- Use a readable OG image (1200×630 recommended) with high contrast and large text.
- Keep tags consistent across OG and Twitter to avoid mismatched previews.
FAQs
What are Open Graph (OG) tags?+
Open Graph tags are meta tags used by platforms like Facebook, LinkedIn, and others to generate a rich share preview (title, description, image).
What are Twitter Card tags?+
Twitter Card tags control how your page looks when shared on X/Twitter. Common cards are summary and summary_large_image.
What is a good Open Graph image size?+
A common recommendation is 1200×630 for a large, readable preview image. Use high contrast and large text for clarity.
I added tags but the preview still shows the old image. Why?+
Platforms cache link previews aggressively. After fixing tags, clear the cache with Facebook’s Sharing Debugger or Twitter’s Card Validator, then re-share the URL.
Do I need both Open Graph and Twitter Card tags?+
Twitter/X falls back to Open Graph tags when Twitter-specific ones are missing, but explicit twitter: tags give you precise control — especially the card type and @site attribution.
More free tools
Want guides and tips? Visit the ToolsOfWeb blog or go back to the homepage.
Related guide
Read guide: Open Graph + Twitter Card tags (fix social share previews) →
