Home › Developer Tools › Meta Tag and Open Graph Generator

Meta Tag and Open Graph Generator

Fill in a page's details and copy the head tags: description, canonical link, robots, Open Graph and Twitter card. Every value is escaped, so the tags stay valid HTML.

How to use

  1. Type the Page title and the full Page URL, including https://.
  2. Write the Description. Aim for 50 to 160 characters. A warning list appears above the output when the title or description is outside the guide.
  3. Optionally add an Image URL, a Site name, and choose the Type, website or article.
  4. The tags appear in the output box as you type. Press Copy tags and paste them between <head> and </head> in your page.

Worked example

The boxes start with the title Tools & Tips, a description containing quotes, an ampersand and angle brackets, and the URL https://example.com/tools/tips.html. The first three lines of output are:

<meta name="description" content="Quick &quot;checks&quot; &amp; fixes &lt;for&gt; your pages, all in the browser.">
<meta name="robots" content="index, follow">
<link rel="canonical" href="https://example.com/tools/tips.html">

Notice what escaping did. The quotes became &quot; so they cannot end the attribute early, and the angle brackets became &lt; and &gt;. The same page also gets og:type, og:title, og:description, og:url, og:image, og:site_name, and four Twitter card tags. With an image supplied the card type is summary_large_image. That is thirteen tags in total for this input.

How it works

Enter the page title, description and full page URL. The image URL and site name are optional. The tool builds the tags in the box above as you type, with every value escaped for an HTML attribute.

Title and description lengths are checked and shown as warnings. The title should be 60 characters or fewer. The description should be 50 to 160 characters. A warning does not stop the tags being built.

The Open Graph protocol, documented at ogp.me, was created so a shared link can become a rich preview. Its four required properties are og:title, og:type, og:image and og:url. The description meta tag and the canonical link are covered in Google's snippet and canonical URL documentation. Attribute escaping follows the HTML rules for attributes: a double-quoted value must not contain a raw double quote or an ambiguous ampersand.

This tool does not send what you type anywhere; as on every page, the site's analytics load separately.

What each tag is for

TagUsed byPurpose
descriptionSearch enginesA source for the snippet under the result title. It may be rewritten.
canonicalSearch enginesNames the preferred address when several URLs show the same content.
robotsCrawlersSays whether the page may be indexed and its links followed.
og:*Social and chat appsSupplies the title, description and picture of a link preview.
twitter:*X (Twitter)Chooses the card layout. It falls back to Open Graph for missing values.

Common mistakes

Frequently asked questions

Do meta descriptions affect ranking directly?

Google says the description is not a ranking factor, but it can become the snippet and influence whether people click.

Why does Google show a different snippet from mine?

Search engines may build the snippet from the page text when that matches the query better.

Is the keywords meta tag needed?

No. Google does not use it, so the tool does not generate one.

What does article change?

It sets og:type to article. That is the usual type for blog posts and news. Use website for home pages and tools.

Are my entries stored?

No. The tags are built in your browser from what you type, and nothing is saved.

Related tools