Skip to content

OG Tag Generator

Fill in your page details and get ready-to-use Open Graph and Twitter Card meta tags. Just copy and paste into your HTML head.

0/60 recommended
0/200 recommended
Must be absolute URL. Recommended: 1200x630px.

Generated Tags

Fill in the fields above and the meta tags will appear here.

What does this tool do?

Type in your page title, description, and image URL. The tool builds all the Open Graph and Twitter Card meta tags you need. Copy the output and paste it into the of your HTML.

You do not have to remember which tags go where or what format they need. The generator handles og:title, og:description, og:image, og:url, og:type, twitter:card, and more. It updates in real time as you type.

Which tags does it generate?

The generator creates both Open Graph and Twitter Card meta tags from a single form:

  • og:title and twitter:title: the headline that shows up in the link preview
  • og:description and twitter:description: the short summary below the title
  • og:image and twitter:image: the preview image (must be an absolute URL starting with https://)
  • og:url: the canonical URL of the page
  • og:type: the content type (website, article, product, profile, etc.)
  • og:site_name: your website or brand name, shown as a label on Facebook and Discord
  • og:locale: the language and region (e.g. en_US, de_DE)
  • twitter:card: controls whether Twitter shows a large image or a compact thumbnail
  • twitter:site: your Twitter/X handle, shown on the card

How to add Open Graph tags to your site

Here is the quick version:

  • Fill in the form above. At minimum you want a title, description, and image URL.
  • Click Copy to grab the generated HTML meta tags.
  • Paste them inside the tag of your HTML page, before the closing . If you use WordPress, Squarespace, or another CMS, look for an SEO plugin that lets you set these without editing code.

Tips for better social previews

Keep your title under 60 characters so it does not get cut off. Keep the description under 200. Use an image that is 1200x630 pixels and under 300KB. Always use absolute URLs starting with https://. After adding the tags, test your page with our OG Tag Validator to make sure everything is set up right. Then use the Social Media Preview tool to see exactly how it looks on each platform.

Common questions

Where do I paste these tags?

Put them inside the section of your HTML page. If you use a CMS like WordPress, there are plugins that let you set these without editing code. Yoast SEO and Rank Math both have Open Graph fields built in. After adding them, run your page through the OG Tag Validator to make sure they are correct.

Do I need both Open Graph and Twitter tags?

Twitter falls back to Open Graph tags if its own tags are missing. But you still need twitter:card to control the layout. Without it, Twitter might show a small thumbnail instead of a full-width image. Setting both gives you the most control.

What image size should I use?

Go with 1200x630 pixels. That works well on every platform. Make sure it is served over HTTPS and the file is under 300KB if you want it to load fast on WhatsApp.

What og:type should I use?

Use "website" for your homepage and landing pages. Use "article" for blog posts and news articles. Use "product" for product pages. Most sites just use "website" and that is fine.

What is og:locale for?

It tells Facebook and other platforms what language your content is in. Use the format language_TERRITORY, like en_US for American English or de_DE for German. If you skip it, platforms assume en_US.

Can I test the tags after adding them?

Yes. Use our OG Tag Validator to check that all your tags are present and correct. Then use the Social Media Preview tool to see how your link will look on Facebook, Twitter, LinkedIn, Discord, Slack, and WhatsApp.