Open Graph Generator guide
Create the Open Graph and X (Twitter) card tags that control how your link looks on Facebook, LinkedIn, Slack, iMessage, Discord, and X. Fill in the fields, check the live preview, and copy the tags into your page head.
What happens when someone shares your link
When a URL is pasted into Slack, iMessage, LinkedIn, Facebook, Discord, or X, the platform's crawler fetches the page and looks in the head for Open Graph tags. It takes og:title, og:description, and og:image and builds the preview card. If the tags are missing, it guesses from the page title and whatever image it finds first, which is how you end up with a preview showing your cookie banner or a 16-pixel logo.
The Open Graph protocol, published by Facebook in 2010, defines the og: tags. X (formerly Twitter) has its own twitter: tags, but it falls back to the Open Graph values for title, description, and image when its own tags are missing. The four tags that matter most are og:title, og:description, og:image, and og:url, plus twitter:card to choose X's layout.
Tag by tag
og:title: the headline on the card. Keep it under about 60 to 70 characters; it does not need to match your SEO title and often works better without the brand suffix. og:description: one or two sentences, under about 200 characters, since most apps show far less. og:url: the canonical URL of the page, so likes and shares of URL variants roll up to one address. og:type: website for most pages, article for blog posts and news. og:site_name: your brand, shown above or below the title on some platforms. og:image:alt: a text description of the image for screen reader users.
twitter:card: summary_large_image for a full-width image, or summary for a small square thumbnail beside the text. twitter:site: your brand's X handle, which X can show as attribution.
Getting the image right
Use 1200 × 630 pixels, a 1.91:1 ratio. That size looks sharp on high-density screens and matches the large-card layout on Facebook, LinkedIn, and X. Put the important content, like a headline or logo, in the center: some apps crop to a square, and others overlay the title at the bottom.
Keep the file small, ideally well under 1 MB, in JPG or PNG. X documents a 5 MB limit for card images, and slow-loading images sometimes time out in crawler fetches, leaving a blank card. Always use an absolute https:// URL. A relative path like /og.png is the single most common reason a preview shows no image.
Worked example: a blog post
Title: How We Cut Our AWS Bill by 40%. Description: The three changes that saved us $4,200 a month, with the exact configs. URL: https://example.com/blog/aws-bill. Image: https://example.com/og/aws-bill.png. Type: article. Site name: Example Eng. Handle: @exampleeng.
The generator outputs og:type article, og:title, og:description, og:url, og:site_name, og:image, og:image:alt, twitter:card summary_large_image, twitter:site, twitter:title, twitter:description, twitter:image, and twitter:image:alt. Paste them into the head of that post. In Astro, Next.js, or most static site generators, you would put the same values into the layout's head section driven by each page's frontmatter, so every page gets its own card automatically.
Testing and cache busting
Platforms cache previews aggressively, sometimes for days. After changing tags, use Facebook's Sharing Debugger to re-scrape the URL and LinkedIn's Post Inspector to refresh LinkedIn's copy. Slack and Discord cache per URL, so adding a harmless query parameter like ?v=2 makes them fetch fresh tags.
Also check that the crawler can reach the page. Previews fail if the page requires a login, blocks unknown user agents, is behind a bot-challenge page, or returns the tags only after JavaScript runs. Most social crawlers do not execute JavaScript, so tags must be in the server-rendered HTML.
Common mistakes
Relative image URLs. The same generic image on every page, which makes every share look identical. Titles written for Google keyword matching rather than for a human scrolling a feed. Forgetting og:url, so shares split across http, https, and tracking-parameter versions of the same page. And using property= for twitter: tags: Open Graph uses property, while X's tags officially use name, which is what the generator outputs.
How we calculate: sources
Frequently asked questions
What are Open Graph tags?
Meta tags in a page's <head> that tell social platforms and chat apps what title, description, and image to show when someone shares the link. The protocol was created by Facebook in 2010 and is now read by LinkedIn, Slack, Discord, iMessage, WhatsApp, and many more.
What size should an og:image be?
1200 × 630 pixels (a 1.91:1 ratio) is the safe standard for large previews. Keep important text away from the edges, since some apps crop to a square, and keep the file under a few megabytes; X caps card images at 5 MB.
Do I need Twitter card tags if I have Open Graph tags?
X falls back to og:title, og:description, and og:image when twitter: tags are missing, but it still needs twitter:card to choose the large or small layout. The generator outputs both sets so nothing is left to chance.
Why is my link preview not updating?
Platforms cache previews. Use Facebook's Sharing Debugger or LinkedIn's Post Inspector to force a re-scrape. For others, adding a query string like ?v=2 to the shared URL makes them fetch fresh data.
Does the image URL have to be absolute?
Yes. Use the full https:// URL. Relative paths like /og.png are ignored by most platforms, which is the most common reason a preview has no image.
Do Open Graph tags help SEO?
Not directly; Google does not rank pages on them. They improve how links look when shared, which can raise click-through from social and messaging apps.
Is my data uploaded?
Everything runs in your browser. Nothing you enter is uploaded to a server or stored by us.
Do Open Graph tags work in WhatsApp and iMessage?
Yes. Both read og:title, og:description, and og:image. WhatsApp may skip very large images, so keeping the file under a few hundred kilobytes improves reliability.
Can I have different images for Facebook and X?
Yes. Set og:image for Facebook, LinkedIn, and most apps, and twitter:image for X. X uses twitter:image when present and falls back to og:image otherwise.