Developer tool

Meta Tag and Open Graph Generator

Enter page metadata and a public image URL to draft tags and review their character lengths.

Runs in your browser. No upload.

Values are processed locally in this browser.

Result

—

About this tool

Meta Tag and Open Graph Generator made simple.

Social platforms may ignore or crop tags. Use a canonical URL you control and ensure the preview image is public and correctly sized.

Guide

Using Meta Tag and Open Graph Generator

The Meta Tag and Open Graph Generator turns a page title, a short description and a web address into a block of HTML tags for the head of a page. It writes the title, description, canonical link, Open Graph tags and Twitter card tags, plus a comment that counts the characters in your title and description. It does not open your live page, check that an image loads, or promise how a search engine or social site will show your link.

How to use it

  1. Type the page title and a description of the page. Both are needed. The title can have up to 200 characters and the description up to 500.
  2. Enter the canonical URL as a full address that starts with http:// or https://. This is the address you want treated as the main home of the page.
  3. If you want, add a public image address and a site name. Change the locale code from en_US when the page uses another language or region.
  4. Press Calculate, read the character counts on the first line, then copy the result and paste it between the head tags of your page.

Worked examples

A page with no social image

You enter
Title
Blue Ceramic Mugs | Hearth Studio
Description
Hand-made mugs fired in small batches. Free delivery over 40 euros.
Url
https://example.com/mugs
Image
Site name
Hearth Studio
Locale
en_US
You get
First line
<!-- 33 title characters · 67 description characters -->
Canonical
<link rel="canonical" href="https://example.com/mugs">
Twitter card
summary
Og image line
not written

The first line counts 33 characters in the title and 67 in the description. With no image address the tool writes a summary card and leaves out every image line. It also writes og:type as website, plus og:title, og:description, og:url, og:site_name and og:locale.

Run through the tool’s own code.

Special characters and a social image

You enter
Title
Spring Sale: Tom & Jerry's "Best" Toys
Description
Save on toys <today>.
Url
https://example.com/sale?a=1&b=2
Image
https://example.com/img/sale.jpg
Locale
en_GB
You get
Title
<title>Spring Sale: Tom &amp; Jerry&apos;s &quot;Best&quot; Toys</title>
Description
<meta name="description" content="Save on toys &lt;today&gt;.">
Canonical
https://example.com/sale?a=1&amp;b=2
Twitter card
summary_large_image
Og image
https://example.com/img/sale.jpg

Ampersands, quotes, apostrophes and angle brackets are swapped for HTML entities so the tags stay valid. Adding an image address switches the card type to summary_large_image and adds og:image and twitter:image lines.

Run through the tool’s own code.

An address with no https

You enter
Title
Home
Description
Hi
Url
example.com
You get
Message
Canonical must be a complete URL.

The canonical address must be complete, with http:// or https:// at the start. The same check applies to the image address, and addresses with a username or password in them are refused.

Run through the tool’s own code.

When it helps

  • Draft the head tags for a new landing page, blog post or product page before it goes live.
  • Add share tags to a hand-written static site that has no SEO plugin.
  • Compare two wordings of a title or description by their character counts.
  • Check that a canonical address and an image address were typed in full before you paste them into a template.

Limits to keep in mind

  • The title must be 1 to 200 characters and the description 1 to 500. The counts are only shown for your information; no ideal length is enforced.
  • The output always uses og:type website, so it does not suit article, product or video pages without a hand edit. It does not add image width or height, a robots tag, a charset or a viewport tag.
  • The Twitter lines are written with the property attribute. Many sites write them with name instead, so check how your target platform reads them.
  • The tool never fetches your page or image. It cannot tell whether the image is public, the right size, or whether a social site will crop it.

Tips

  • Write the description for a person reading a result list first. Search engines may replace it with text taken from the page.
  • Use a full web address for the image, and open it in a private browser window to see that it loads without a login.
  • Delete the counting comment on the first line if you do not want it in the source of your page.

Sources

Common questions

About Meta Tag and Open Graph Generator.

Where do I paste the generated tags?

Paste them between the opening and closing head tags of your HTML file. In a content system, look for a field for custom head code. Afterwards check that the page does not end up with two title tags or two descriptions.

How long should a title and description be?

The tool only counts characters and does not set a target. Google says a meta description has no length limit, but the snippet is cut to fit the device width. Keep the key words near the start of each text.

Why is there no og:image line in my result?

The image box is optional, so the tool writes image lines only when you fill it in. The Open Graph protocol lists og:image among four required properties, so add a public image address if you want complete markup.

Will Google show my meta description?

Not always. Google says it mostly builds a snippet from the content of the page, and may use the meta description when it describes the page better than the text on the page does.

What does the canonical link do?

The canonical link names the address you prefer when the same page can be reached through several addresses. The tool uses the same address for og:url. Pick an address you control that really loads.

Why were my quotes and ampersands changed?

Characters that have a special meaning in HTML are written as entities, such as &amp; for an ampersand and &quot; for a double quote. Browsers turn them back into the normal characters, so visitors see your original words.

Is my text sent to a server?

No. The page says the values are processed locally in your browser. The tool only reads the web addresses you type and never opens them, so nothing is requested from your site or image host.

How do I use Meta tag generator?

Enter page metadata and a public image URL to draft tags and review their character lengths.

Is my data uploaded to a server?

No. This tool runs locally in your browser. Your input is not uploaded.