Open Graph Tags Generator
Generate Open Graph and Twitter Card meta tags for better social media sharing.
Total Meta Tags: 0Character Count: 0
Generated Tags
About Open Graph Tags Generator
Open Graph (OG) tags are HTML meta tags that control how URLs are displayed when shared on social media platforms like Facebook, LinkedIn, and Slack. Twitter Card tags serve the same purpose on Twitter/X. Adding these tags ensures your pages show a rich preview with title, description, and image when shared. The recommended OG image size is 1200×630 pixels. Descriptions should be 150-160 characters for optimal display.
Built and maintained by Meet Shah · Last updated
What this tool is used for
- Producing Open Graph and Twitter Card tags so a shared link renders a card.
- Fixing a link that shares with the wrong title or no image.
- Getting the image dimension requirements right for the platforms you care about.
- Producing a consistent tag set across a template.
- Previewing how a page will look when shared before publishing.
Frequently Asked Questions
- Why does the same page need both Open Graph and Twitter Card tags?
- Because they are separate specifications read by different crawlers. X falls back to Open Graph when a `twitter:` tag is missing, so the overlap is often harmless — but `twitter:card`, which decides between a small thumbnail and a large image, has no OG equivalent at all.
- What happens if my title contains a quotation mark?
- It is escaped to `"` before it reaches the attribute. Left raw, a title like `The "Best" Guide` closes the `content="…"` early and the rest becomes junk attributes on the tag — output that still looks correct in a preview box and breaks in every crawler.
- What image size should og:image be?
- 1200×630 is the safe default — a 1.91:1 ratio that Facebook, LinkedIn and X's large card all accept without cropping. Keep it under about 5 MB, use an absolute URL, and remember most crawlers will not follow a redirect to reach it.
- Why is my updated preview still showing the old image?
- Because every platform caches scraped metadata aggressively, often for days. Facebook's Sharing Debugger and LinkedIn's Post Inspector both have a re-scrape button; X's card validator no longer does, so a cache-busting query string on the image URL is the practical workaround.
- Does og:type actually do anything?
- It selects which additional properties are meaningful. `article` unlocks `article:published_time` and `article:author`; `product` unlocks price and availability. Setting `article` without those extra tags is harmless, but the type alone changes nothing about how the card renders.
Common errors and gotchas
- Using a relative image URL, which every platform requires to be absolute.
- Serving an image too small or the wrong ratio, which platforms then crop or refuse.
- Assuming a change takes effect immediately, when platforms cache aggressively and need a re-scrape.
- Omitting the URL tag, which leaves the canonical target ambiguous for the card.
- Duplicating tags in the head, where the platform picks one unpredictably.
Related Web & SEO tools
Meta Tag Generator
Build SEO title, description, and viewport meta tags.
Open Graph Generator
Generate Open Graph and Twitter Card meta tags.
Robots.txt Generator
Build a robots.txt file with per-bot rules. Block AI crawlers, set crawl delays, define sitemaps.
UTM Campaign URL Builder
Append UTM parameters to build trackable campaign URLs.
Hreflang Tag Generator
Generate hreflang link tags for multilingual SEO.
Sitemap XML Generator
Build an XML sitemap from a list of URLs.
SERP Snippet Preview
Preview how your page title and meta description appear in Google search.
Meta Tag Analyzer
Paste a page's HTML head to audit its title, meta, and social tags.