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
- Type the Page title and the full Page URL, including
https://. - 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.
- Optionally add an Image URL, a Site name, and choose the Type, website or article.
- 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 "checks" & fixes <for> 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 " so they cannot end the attribute early, and the angle brackets became < and >. 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.
What each tag is for
| Tag | Used by | Purpose |
|---|---|---|
| description | Search engines | A source for the snippet under the result title. It may be rewritten. |
| canonical | Search engines | Names the preferred address when several URLs show the same content. |
| robots | Crawlers | Says whether the page may be indexed and its links followed. |
| og:* | Social and chat apps | Supplies 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
- Using a relative URL. Open Graph and canonical values need the full address. The tool refuses addresses that do not start with http:// or https://.
- Writing one description for every page. Duplicate descriptions give search engines nothing to tell pages apart, and every share preview looks the same.
- A canonical link that points elsewhere by accident. It tells search engines to prefer another page. Check each page names itself unless you mean otherwise.
- An image that is too small or blocked. Preview crawlers need a public address. Pictures behind a login do not appear. A shape around 1200 by 630 pixels suits most large previews.
- Expecting instant refresh. Chat apps cache previews. After you change a tag you may need to use the platform's own debugger to refresh it.
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
- Sitemap and robots.txt Generator to list the pages you have tagged.
- URL Parser and Query Builder to check the address before you paste it in.
- HTML Entity Encoder and Decoder to see how escaping works.
- Word and Character Counter to check a longer description.