Open Graph Generator
Enter a title, description, image, and URL to get og: meta tags you can paste into your page's <head>. The page also shows an approximate preview of the share card.
Preview
Page title
<meta property="og:type" content="website" />
How it works
Open Graph tags are meta lines in the page's <head>, with a property that starts with og:. When someone pastes your link on Facebook, LinkedIn, or another service that reads these tags, they control which title, description, and image appear on the share card.
This tool builds the tags from the fields you fill in: og:title, og:description, og:image, og:url, og:type, and og:site_name. An empty field is left out of the output. The type menu starts on Website, so an og:type line is always included with the value you selected. If the title or description contains ", &, or angle brackets, the tool escapes them as HTML entities so the tag stays valid.
The image URL must be absolute, including https://, not a relative path such as /og.png. For how the image appears on Facebook, Meta's documentation says: use at least 1200×630 pixels for a good display on high-resolution screens, keep the aspect ratio close to 1.91:1 so the image is not cropped in Feed, the minimum accepted size is 200×200, and the file must be 8 MB or less. Below 600×315 the image still appears, but much smaller.
The preview in this tool is an approximate card, not Facebook's actual scrape. After you publish the tags, check the URL in Facebook's Sharing Debugger or LinkedIn's Post Inspector, because those services cache the preview. The tool only generates HTML tags. It does not crawl your site or refresh any network's cache.
Read the full guideHow to use it
- Enter a title, a description, and a full image URL that starts with https://. The preview card updates as you type.
- Add the page URL in og:url, choose a content type (Website, Article, Product, and so on), and optionally a site name in og:site_name.
- Copy the <meta> block, or press "Download .html", and paste the tags into the page's <head>.
- After you publish, check the link in the debugger of the network you share to. If you replace an image, Meta says you should also give the file a new URL, or the cache may keep showing the old one.
Examples
Frequently asked
- What size should the Open Graph image be?
- For how the image appears on Facebook, Meta's documentation recommends at least 1200×630 pixels, and an aspect ratio close to 1.91:1 so the image is not cropped in Feed. The minimum they accept is 200×200, and the file must be 8 MB or less. Below 600×315 the image still appears, but much smaller. This tool does not check the file's dimensions.
- Why does Facebook still show the old preview after I update the tags?
- Facebook and LinkedIn cache the preview from the first time they scrape the link. After you publish a change, run the URL through Facebook's Sharing Debugger or LinkedIn's Post Inspector to request a new scrape. If you replaced an image at the same URL, Meta says you should use a new URL for the file, or the cache may keep the old image.
- Do I need to fill in every field?
- No. An empty field is simply omitted from the output, except og:type, which is always included with the selected value (default: website). For a share card you usually fill in at least a title, a description, and an image, plus the page URL.
- Why does the image URL have to be absolute?
- og:image is a URL the network's crawler requests. A relative path such as /og.png is not enough, because the crawler does not know which site to resolve it against. Use a full URL that starts with https:// and opens without a login.
- Are Open Graph tags the same as JSON-LD?
- No. Open Graph tags control how the link looks on a share card. JSON-LD (schema) is a separate markup format for search engines. You can use both on the same page; this tool only generates the og: tags.
- Where do these tags go in Next.js?
- The tool generates HTML tags for the <head>. In the Next.js App Router you do not paste them into a client component. Pass the same values to export const metadata or generateMetadata, in the openGraph field (title, description, url, type, siteName, images).