Skip to main content
CalcChef

Open Graph Generator

Write Open Graph meta tags for link previews: og:title, og:type, og:url and og:image, plus description, site name and image alt, with a required-tag check. How it works

Use the Open Graph Generator

Uses the title, description, image and image description above. Creator handles and more are in the Twitter card generator.

Generated Meta Tags

<meta property="og:type" content="website" />

Link preview

Image area (1.91:1, for example 1200 x 630). The image is not loaded here.

example.com

Page title

A rough layout from the fields on the left. Each site draws its own card.

Required by ogp.me

  • Missing: og:title
  • Present: og:type
  • Missing: og:image
  • Missing: og:url

Facebook, LinkedIn and others cache a page's tags, so a change can take a while to show up in a preview.

About the Open Graph Generator

ogp.me lists four properties every page needs: og:title, og:type, og:image and og:url. The Open Graph generator always writes og:type (website unless you pick another type), adds the other three when you fill them in, and marks each one Present or Missing. The page URL and image URL must be full addresses that start with http:// or https://. A tick box adds Twitter card tags built from the same title, description and image.

Fields and the tags they write

FieldTagRequired by ogp.me
Titleog:titleYes
Typeog:typeYes
URLog:urlYes
Image URLog:imageYes
Image descriptionog:image:altNo
Descriptionog:descriptionNo
Site Nameog:site_nameNo

Tags are written in this order. ogp.me says a page that sets og:image should also specify og:image:alt, so an image without a description gets a reminder.

Addresses the URL field refuses

You typeMessage
example.com/pageThe page URL must be a full address starting with http:// or https://.
/pageThe page URL must be a full address starting with http:// or https://.
ftp://example.com/pageThe page URL must be a full address starting with http:// or https://.
https://example.com/my pageThe page URL cannot contain spaces. Write a space as %20.
https://user:[email protected]/The page URL cannot contain a user name or password (the part before @). Remove "user:password@"; a browser would visit the host after the @.

The Image URL field gives the same messages, starting "The image URL". A refused address is left out of the tags and its line in the checklist reads Missing.

Frequently asked questions

What are the required Open Graph tags?
og:title, og:type, og:image and og:url, according to ogp.me. With every field empty the generator writes only <meta property="og:type" content="website" /> and lists the other three as Missing.
Can og:image be a relative path?
Not in this generator: /images/a.jpg gets "The image URL must be a full address starting with http:// or https://." Write the whole address, such as https://example.com/images/a.jpg.
Do I need og:image:alt?
ogp.me says a page that sets og:image should also specify og:image:alt. Leave the Image description empty with an image set and the generator adds a reminder; a description without a valid image URL is not written.
What size should an og:image be?
Facebook’s sharing guide asks for at least 1200 × 630 pixels and an aspect ratio as close to 1.91:1 as you can, so the full image shows in the feed without cropping; the smallest it accepts is 200 × 200. The generator does not check the size, because it never downloads the image.
Why does the old preview still show after I changed the tags?
Facebook, LinkedIn and others cache a page’s tags. Facebook’s guide says a new image does not change earlier shares by itself, and suggests running the URL through its Sharing Debugger so the tags are fetched again.
Which og:type values can I pick?
website (the default), article, profile, book, and four video types: video.movie, video.episode, video.tv_show and video.other. A video type adds a note that video pages normally also carry og:video tags, which this generator does not write.

Related Tools

View all tools