Build the og: tags a page needs, then see the card Facebook, LinkedIn and Slack will actually render — including how the title and image get cropped.
PAGE
CARD
Load a sample
The card
The headline on the card. Usually shorter and punchier than the page's <title>.
One or two sentences. This is the only body text most cards show.
The canonical address of this page — the same one as your canonical link, without tracking parameters.
The name of the site as a whole, not this page.
website suits most pages.
Underscore, not hyphen — en_US.
The image
Must be an absolute URL. A relative path is the commonest reason a card has no image.
Describes the image for people who cannot see it.
Pixels
Pixels
X (Twitter) card
Preview — an approximation
No og:image
example.com
Your og:title appears here
Your og:description appears here.
A generic mockup, not a rendering of Facebook, LinkedIn, WhatsApp, X, Slack or any other platform. Each one crops images to its own ratio, truncates text at its own width and changes those without notice — check the real thing in that platform’s own sharing debugger before you rely on it.
Open Graph tags1 tag
<meta property="og:type" content="website">
Paste these inside the <head> of your page. Crawlers read the head, and many stop parsing once the body starts.
Without og:title, most platforms fall back to the page's <title>, which is often written for search results rather than for a shared card.
Without og:description, platforms fall back to the meta description or to whatever text they find first on the page.
Without og:image, a shared link usually appears as a plain text row. It is the single most visible tag here.
og:url is the canonical address for this page. Without it, the same content reached by two paths can be treated as two separate things.
Everything runs locally in your browser. Your text is never uploaded — the tags are assembled and escaped on your device. The one request that leaves is the preview image, which your browser fetches from the URL you enter so it can be shown.
What is Open Graph?
Open Graph is a small protocol for telling other software what a web page is. Facebook introduced it in 2010 to make shared links look like something rather than like a URL, and it spread: LinkedIn, WhatsApp, Slack, Discord, Signal, Telegram, Pinterest and X all read the same tags today.
The mechanism is deliberately unambitious. You put a few <meta> elements in your page’s <head>, each carrying one property, and anything that fetches your page can build a preview from them.
Without these, a platform has to guess. It will take your <title>, hunt for a meta description, and pick whichever image on the page looks most promising — which is how a shared article ends up illustrated with an author avatar or a sponsor logo.
How Open Graph tags work
Nothing happens at your end. When someone pastes your link, the platform requests your page like any other client, reads the head, and builds a card from whatever Open Graph properties it finds. There is no submission step, no API and no account.
Three consequences follow from that, and all three catch people out.
The crawler has no context. It is not a browser sitting on your page — it has fetched a URL in isolation. That is why og:image must be absolute: there is nothing for /images/cover.jpg to be relative to.
Most crawlers do not run JavaScript. Tags added to the head after page load usually do not exist as far as they are concerned. Render them server-side or put them in the static HTML.
Results are cached. Platforms keep what they scraped, often for days. Editing a tag does not update a card that has already been fetched.
The property attribute is not a stylistic choice either. Open Graph is built on RDFa, which uses property; a strict parser ignores <meta name="og:title"> entirely. The meta tag generator covers the ordinary head tags that sit alongside these — title, description, robots and viewport.
og:title
The headline on the card. It does not have to match your page’s <title>, and usually it should not: a page title is written for a search results page and often carries the site name and a separator, while og:title appears on a card that is already showing your domain.
The same page, two audiences
1<title>Meta Tags That Get Clicked | Example Blog</title>2<meta property="og:title" content="Meta Tags That Actually Get Clicked">
Open Graph specifies no length limit. In practice most platforms show somewhere around sixty characters before truncating, so the important half belongs at the front. The counter above the field is guidance, not a rule — it never stops you generating the tag.
og:description
One or two sentences of body text — the only prose most cards display. It should say what the reader gets, not restate the title in different words. The title and the description sit two lines apart, and repetition is obvious there.
Leave it out and platforms fall back to your meta description, and then to the first substantial text they find on the page. That fallback is occasionally fine and frequently a cookie notice.
Cards typically show around 155 characters, and less on mobile. As with the title, front-load it.
og:image
The most visible tag here by a wide margin. A link with an image occupies several times the space of one without, in a feed where space is attention.
It must be an absolute URL. This is the single commonest Open Graph mistake, and it is invisible when you check your own page in a browser, where the relative path resolves perfectly.
On dimensions: 1200 × 630 is the conventional size and suits the large-card layouts, but it is a convention rather than a requirement — Open Graph specifies nothing. Several platforms treat roughly 200 × 200 as a floor and will show anything below it as a thumbnail or drop it.
Because platforms crop to their own ratios, and some show a square thumbnail in certain contexts, keep text and faces away from the edges. That is more reliable than trying to satisfy every layout at once. If the file you have is a full-size original, the image compressor will resize and re-encode it in the browser before you upload it.
Supply og:image:width and og:image:height when you know them: a platform can then lay the card out before the image finishes downloading. And add og:image:alt — it describes the picture for people using a screen reader on a platform that supports it.
og:url
The canonical address of the page. Its job is identity: it tells a platform which page this is, which is how shares arriving from a dozen different links get counted as one thing rather than a dozen.
Point it at the clean canonical URL — the same one in your <link rel="canonical"> — and not at whatever address the current visitor happens to be on. A URL carrying a session id or campaign parameters splits your share count and can have a platform treat one page as several. The canonical URL generator strips those campaign parameters and shows you exactly what it removed.
If you are generating those canonical paths, the slug generator produces the readable, lowercase form that belongs in one.
og:type
What kind of thing the page is. website is the default and the right answer far more often than people expect.
The vertical types are not interchangeable labels — each defines further properties of its own, and choosing one without supplying them gains you nothing.
The Open Graph types this generator offers, what each is for, and what else each expects
Type
Use it for
Also expects
website
Home pages, landing pages, product pages, anything that is not one of the below.
The default, and the right answer far more often than the others. Nothing extra is required.
article
Blog posts, news stories, guides — anything with an author and a publication date.
Optionally takes article:published_time, article:author and article:section, which this generator does not produce.
profile
A page about one person.
Optionally takes profile:first_name, profile:last_name and profile:username.
book
A page about a single book.
Optionally takes book:author, book:isbn and book:release_date.
music.song
A page for one track.
Expects music:duration, music:album and music:musician to be genuinely useful.
video.movie
A page for one film.
Expects video:duration, video:release_date and video:actor. For embedded players you also need the og:video tags.
og:site_name
The name of the site as a whole, not of this page. On a card it appears as a small label near the domain, so it is where Example Blog goes while og:title carries the headline.
It is optional, it is the same value on every page of your site, and it takes two seconds to add to a template. There is no reason not to.
Open Graph vs X (Twitter) cards
Two separate specifications that overlap almost entirely. X defined its own card tags, then made its parser fall back to Open Graph when they are absent — so a page with good og: tags already gets a card on X without a single twitter: tag.
The difference that matters is the attribute, and it catches almost everyone at least once because the two blocks sit next to each other:
property for Open Graph, name for X — not interchangeable
Open Graph uses property because it is built on RDFa; the twitter: tags use name because they were specified against plain HTML meta elements. Swap them and it works in lenient parsers and fails in strict ones — which is worse than failing everywhere, because it survives your testing.
Add the X block when you want one of three things:
Different values on X than elsewhere — a shorter title, a different image.
A specific card type. summary_large_image gives the wide layout; summary gives a compact one with a square thumbnail.
Attribution, via twitter:site, which credits the account behind the site.
Otherwise Open Graph alone is enough, and one set of tags is one set to keep in sync.
Why previews differ between platforms
Every platform reads the same tags and then makes its own decisions about them. This is why no tool — including this one — can promise you an exact rendering.
Different crops. One shows a wide banner, another a square thumbnail, a third something in between. The same image is cropped differently in each.
Different truncation. Card widths differ, mobile and desktop layouts differ, and each decides where to cut a long title.
Different fallbacks. With a tag missing, one platform reads your meta description while another scrapes page text.
Different caches. Each keeps its own copy of what it scraped, for its own duration. The same link can show two different cards in two apps for days after an edit.
They redesign. Card layouts change, and any tool claiming to show one exactly is showing a snapshot of a moving target.
The practical approach: write tags that work when cropped and truncated — front-load the title, keep image content away from the edges — then verify in the platform’s own debugger, which is also how you force a cache refresh after a change.
Common implementation mistakes
Open Graph fails quietly. Nothing errors, nothing warns — the card is just wrong, or missing, and usually nobody notices until a link has been shared.
A crawler fetching your tags has no page context to resolve a relative path against, so the image simply does not load. This is the commonest Open Graph mistake by a wide margin, and it is invisible when you test by looking at your own page.
Using name instead of property
Wrong
<meta name="og:title" content="Example">
Right
<meta property="og:title" content="Example">
Open Graph is built on RDFa, which uses the property attribute. Some parsers are lenient and some are not, so this fails on a subset of platforms — which is worse than failing everywhere, because it looks like it works.
The exact inverse of the previous mistake. The twitter: tags were specified against plain HTML meta elements and use name. Getting the two conventions the wrong way round is easy when they sit next to each other in the same block.
Leaving an unescaped ampersand or quote in a value
Wrong
<meta property="og:title" content="Tom & Jerry: "The Chase"">
Right
<meta property="og:title" content="Tom & Jerry: "The Chase"">
Crawlers read the document head, and many stop parsing once the body starts. Tags injected further down the page by client-side JavaScript have the same problem — most crawlers do not run it.
Expecting a preview to update on its own
Wrong
Change the tag, share the link, see the old card.
Right
Change the tag, then re-scrape the URL in the platform's own debugger.
Platforms cache the tags they scrape, often for days. The card you see after an edit is usually the cached one. Each major platform has a sharing debugger that forces a fresh fetch; that is the only reliable way to see a change.
Assuming one image works everywhere
Wrong
A 1200×630 image, expected to appear uncropped on every platform.
Right
A 1200×630 image with the important content near the centre.
Different platforms crop to different ratios, and several show a square thumbnail in some contexts. Keeping text and faces away from the edges is more reliable than trying to satisfy every layout at once.
Setting og:url to the current address
Wrong
og:url set to whatever URL the visitor arrived on, tracking parameters and all.
Right
og:url set to the canonical address of the page, the same one in your canonical link.
og:url tells a platform which page this is, and it is how shares of the same content from different links get counted together. Pointing it at a URL with a session id or campaign parameters splits that.
Frequently asked questions
What is Open Graph?
Open Graph is a small protocol for describing a web page to other software. It was introduced by Facebook in 2010 and has since been adopted almost everywhere — LinkedIn, WhatsApp, Slack, Discord, Signal, Pinterest and X all read it. You add a handful of meta tags to your page's head, and anything that fetches the page can build a preview card from them instead of guessing.
What are OG tags?
OG tags are the individual meta elements that make up Open Graph, each carrying one property. They look like <meta property="og:title" content="Example Page">. The prefix og: is what marks a tag as Open Graph, and the property attribute — not name — is what makes it valid.
What is og:title?
The headline shown on the sharing card. It does not have to match your page's <title>: the page title is written for a search results page and often carries the site name and separators, whereas og:title is written for a card that already shows the domain. Shorter and more direct usually wins.
What is og:description?
The body text of the card, usually one or two sentences. It is the only prose most cards display, so it should say what the reader gets rather than repeat the title. Without it, platforms fall back to your meta description or to the first text they find on the page, which is rarely what you would have chosen.
What is og:image?
The URL of the picture shown on the card, and by a wide margin the most visible tag here — a link with an image occupies several times the space of one without. It must be an absolute URL beginning with https://, because a crawler has no page context to resolve a relative path against.
What is og:url?
The canonical address of the page. It tells a platform which page this is, which is how shares of the same content arriving from different links get counted as one thing. Point it at the clean canonical URL, not at whatever address the current visitor happens to be on with its tracking parameters attached.
What is og:type?
What kind of thing the page is. website is the default and the right answer for most pages; article is for posts and news; profile, book, music.song and video.movie describe more specific things. The vertical types define extra properties of their own — an article can carry article:published_time and article:author, for instance — which this generator does not produce.
What is og:site_name?
The name of the site as a whole, not of this page. On a card it appears as a small label alongside the domain, so it is where “Example Blog” goes while og:title carries the headline. It is optional and takes two seconds to add.
What size should an OG image be?
1200 × 630 pixels is the conventional choice and works well with the large-card layouts. It is a convention rather than a requirement — Open Graph specifies no dimensions at all. Several platforms treat roughly 200 × 200 as a lower bound and will show anything smaller as a thumbnail or ignore it, and most crop to their own ratio, so keep important text and faces away from the edges.
Do I need og:image:width and og:image:height?
Not strictly, but they help. Given the dimensions, a platform can lay the card out before it has finished downloading the image, which avoids a first render with a gap where the picture will be. Supply both or neither — one alone tells a layout engine nothing useful.
Can OG tags improve SEO?
Not directly. Open Graph tags are not a ranking signal, and Google does not use them to rank pages. What they affect is what happens after someone shares your link: a card with a title, description and image gets clicked far more often than a bare URL. That traffic is real, but it comes from people, not from an algorithm.
Do OG tags work on Google?
Google reads them but does not rank on them. Google Search uses your <title>, meta description and structured data for search results; it may fall back to Open Graph values when the standard tags are missing or unhelpful. Treat Open Graph as being for sharing and structured data as being for search — they are different jobs with some overlap.
Do Facebook and LinkedIn use Open Graph?
Yes, both, and so do WhatsApp, Slack, Discord, Signal, Telegram, Pinterest, Microsoft Teams and X. It is the closest thing the web has to a universal preview format. What differs is how each one lays the card out, how much text it shows and how it crops the image — not whether it reads the tags.
What is the difference between OG tags and Twitter Cards?
They are two separate specifications that overlap almost completely. The most important practical difference is the attribute: Open Graph uses property="og:title" because it is built on RDFa, while X's tags use name="twitter:title" because they were specified against plain HTML meta elements. Swapping the two is a common bug that appears to work, because some parsers are lenient.
Do I need Twitter Card tags if I already have Open Graph?
Usually not. X falls back to the og: tags when the twitter: equivalents are missing, so a page with good Open Graph tags already gets a card. Add the twitter: block when you want something different there — a distinct title, a different image, or specifically the summary card rather than the large one — or when you want to credit an account with twitter:site.
Why is my social preview not updating?
Because the platform cached what it scraped, often for several days. The card you see after editing a tag is almost always the old one. Every major platform has a sharing debugger that re-fetches a URL on demand — Facebook's Sharing Debugger, LinkedIn's Post Inspector, X's card validator — and running your URL through the relevant one is the only reliable way to see a change take effect.
Why does my preview look different on each platform?
Because each platform decides its own layout. They read the same tags but choose their own card width, crop ratio, truncation point and whether to show the site name — and they redesign periodically. Anything that claims to show you exactly how a card will look on a named platform is showing you a snapshot of a moving target.
Can I use an external image URL?
Yes. og:image is just a URL and it can point at a CDN, an asset host or another domain entirely. Two practical conditions: it must be publicly reachable without a login, since a crawler arrives with no session; and it should be served over https, because a mixed-content image is frequently dropped.
Should every page have OG tags?
Every page that anyone might share, which in practice means every public page. The cost is a few lines in a template that reads values you already have. Pages that will never be shared — a checkout step, an internal dashboard — are not worth the effort, and pages you do not want previewed at all are a job for robots directives rather than for omitting tags.
Where do Open Graph tags go in the HTML?
Inside <head>, alongside your other meta elements. Crawlers read the head and many stop parsing once the body begins, so a tag further down the page may never be seen. The same caveat applies to tags injected by client-side JavaScript — most crawlers do not run it, so tags added after load often do not exist as far as they are concerned.
What happens if I use the wrong attribute?
It fails on some platforms and works on others, which is the most expensive kind of bug. Open Graph tags need property and the twitter: tags need name. A parser built strictly on RDFa ignores <meta name="og:title">, while a lenient one accepts it — so a mistake can survive your testing and quietly break elsewhere.
How do I escape quotes and special characters in a tag?
Yes. Meta tags are served as UTF-8, so emoji, accents and non-Latin scripts work as themselves and do not need converting to entities. Set og:locale to tell platforms which language the content is in — note that Open Graph writes it with an underscore, en_US, not the en-US of the lang attribute.
Can I copy the generated HTML?
Yes. The copy button next to each block puts the tags on your clipboard exactly as shown, ready to paste into your template or your CMS's custom-head field. The Open Graph and X blocks copy separately, or use “Copy all tags” for both at once.
Is this generator free, and is my data uploaded?
It is free, and nothing you type leaves your device. The tags are assembled in your browser by JavaScript on this page — there is no server call and nothing is stored. The one request that does leave is the preview image, which your browser fetches from the URL you entered so it can be displayed; that is the same request any visitor to your page would make.
Keep going
Tools that pair with this one
Same privacy model — everything below runs in your browser too.