Tools

Meta Tag Generator

Build your title, meta description, canonical, Open Graph and Twitter Card tags on one screen: character-counted fields, a Google and share preview, and a copy-paste ready full head block. Free, no sign-up.

Code is generated in your browser; nothing is stored.
Recommended size 1200x630 pixels; always use an absolute https URL.

Result

Preview
Your Head Code
Lines for fields you leave empty are not added to the code.
Written by
  • Digital Marketing Expert
  • Google Partner
  • Full Stack Developer
Last updated
Based on
5 sources

How to use the Meta Tag Generator

  1. Pick the page type

    In the top bar, choose Website for normal pages or Article for blog posts and news. The tool writes your choice into the og:type line.

  2. Write the title and description

    The counter measures the title against 60 characters and the description against 160. Green means Ideal, amber Borderline, red Long; the Google preview marks any cut with an ellipsis.

  3. Enter full addresses

    Type the page URL and the image URL in full, starting with https://. A relative path triggers a warning under the field. The tool also leaves that field out of the core field count.

  4. Add alt text and identity details

    Describe what the image shows in one sentence. Then fill in the site name, language code, X username and card type. On this page, en_US comes prefilled. If you type the @ sign, the tool will not repeat it.

  5. Choose the robots value

    Keep index,follow for normal live pages. For a page that should stay out of search results, choose noindex,follow or noindex,nofollow.

  6. Preview and copy

    Check the Google and Share card tabs. Then press Copy and paste the code into the head of your page.

Which tag does the meta tag generator write for each field?

The tool does not calculate anything; it maps each field to the matching tags. Below, you can see where every line in your copied code comes from.

Page Title<title> + og:title + twitter:title
Meta Descriptionmeta description + og:description + twitter:description
Page URLlink rel="canonical" + og:url
Image URLog:image + twitter:image
Image Alt Textog:image:alt + twitter:image:alt (only when an image URL is set)
Site Name and Language Codeog:site_name + og:locale
X Usernametwitter:site = @ + username (the tool strips any leading @ signs)
Lines it always writesmeta robots + og:type + twitter:card

The counter counts characters including spaces. Up to 90% of the limit reads Ideal, the last 10% reads Borderline and anything above reads Long. For titles, that means 54 characters or fewer are Ideal, 55 to 60 Borderline and 61 or more Long. For descriptions, the thresholds are 144, 145 to 160 and 161. Empty fields add no lines.

Example inputs and the lines they produce

Each row below is an example scenario; enter the same values in the tool and you will get exactly the same result.

ScenarioWhat you enterCounter or warningLines added to the code
Short titleSEO Consulting | Talha Aslan28 / 60 · Ideal<title>, og:title, twitter:title
Title near the limitSEO Consulting for Turkey and Global Markets | Talha Aslan58 / 60 · Borderline<title>, og:title, twitter:title
Long descriptionAny text of 161 characters or more161 / 160 · Longdescription, og:description, twitter:description (full text)
Relative image path/img/cover.jpgUse a full address starting with https://og:image and twitter:image still appear; the core field count stays the same
Username typed with @@yoursiteNo warning<meta name="twitter:site" content="@yoursite">
Image plus alt texthttps://yoursite.com/img/cover.jpg + alt textCore field count goes up by 1og:image, og:image:alt, twitter:image, twitter:image:alt
All fields emptyOnly the preset valuesCore fields 0/4robots, og:type, og:locale, twitter:card

The tool never shortens your text. It also writes a broken address exactly as typed, so clear the warnings under the fields before you copy.

Meta tag reference table

Use this table to see at a glance what each tag does and who reads it.

TagWhat it doesWho reads itField in the tool
<title>Browser tab text and the main source of the title link in GoogleGoogle, Bing, browsersPage Title
meta descriptionA possible source of the snippet text in search resultsGoogle, BingMeta Description
link rel="canonical"Names the preferred version among duplicate URLsGoogle, BingPage URL
meta robotsRules for indexing and following linksSearch engine crawlersRobots
og:title, og:descriptionHeadline and text of the share cardFacebook, LinkedIn, WhatsApp, SlackTitle and Description
og:image, og:image:altCard image and a text description of itSocial platformsImage URL and Alt Text
og:url, og:type, og:site_name, og:localePermanent address, type, site name and language of the cardSocial platformsURL, Page type, Site Name, Language Code
twitter:card, twitter:siteLayout of the X card and the account it belongs toX (Twitter)X Card Type and Username
meta keywordsNot used by Google for ranking; the tool does not output itNobody, as far as Google is concernedNone

Google lists the meta tags it supports in Search Central. The Open Graph fields, in turn, live at ogp.me. Platform behaviour changes over time, so check the current documentation before a critical launch.

What does this meta tag generator do?

A meta tag generator turns a short form into the tags that belong in the head section of a page. You type the title, description, address and image once. The tool then writes three groups of tags. SEO tags serve search engines, Open Graph tags serve Facebook, LinkedIn or WhatsApp, and card tags serve X (Twitter). As a result, you never type the same text three times, and broken quotes disappear.

I reach for it in two situations. The first is right before a landing page goes live. The second is when a client says "our shared link looks broken". During SEO consulting projects, one of the first things my team and I check is whether every page carries its own title, description and canonical tag.

  • Counters: measure the title against 60 and the description against 160 characters while you type.
  • Preview: draws an approximate Google result and share card.
  • Core field badge: counts how many of title, description, URL and image are ready.
  • Clean code: skips lines for empty fields and escapes special characters such as quotes.

How long should a title tag and meta description be?

There is no fixed character limit. Google sets no length limit for the title element or the meta description. However, it truncates both in results to fit the device width. In other words, the real measure is pixel width. For example, wide letters like M and W take far more space than i or l.

That is why the 60 and 160 characters in the tool are a practical reference. The counter stays green up to 90% of the limit, turns amber in the last 10% and red once you pass it. The Google preview, meanwhile, cuts the title at roughly 580 pixels and the description at roughly 920 pixels. If you want to compare desktop and mobile in detail, the Google SERP preview tool shows the pixel measurement for both.

In practice, I follow three rules:

  • Put the most important words first; if anything gets cut, let it be the brand name at the end.
  • Say what the page offers in the first sentence of the description, because mobile results may cut it earlier.
  • Do not stack keywords. According to Google, descriptions made of long keyword strings are less likely to appear as the snippet.

For the writing side, with examples by page type, see my guide on how to write a meta title and description.

How do Open Graph tags shape the share card?

When you paste a link into Facebook, LinkedIn, WhatsApp or Slack, the platform visits your page and reads its Open Graph tags. Without them, it picks an image and some text on its own. The result is often an irrelevant logo or a line from the menu. Specifically, the Open Graph protocol treats four properties as required: og:title, og:type, og:image and og:url.

The tool adds the description, site name and language code to those four. For the page type, it offers two options:

  • Website: for home, service and product pages. According to Meta's sharing guide, this is also the default when og:type is missing.
  • Article: for blog posts and news.

X, on the other hand, works a little differently. It looks for twitter: tags first and falls back to the Open Graph equivalent when one is missing. The only exception is twitter:card, because the card type has no Open Graph counterpart. That is why the tool always writes this line, with the large image card as the default. For the small card with a square image, choose Small image in the X Card Type field.

I cover the parts of social traffic that go beyond tags in my post on driving website traffic from social media.

Which og:image size and URL should you use?

Meta's developer documentation recommends images of at least 1200 x 630 pixels for the best display on high resolution screens. For link posts with larger images, the minimum is 600 x 315 pixels. Keep the aspect ratio close to 1.91:1 so the feed shows the whole image. Also, keep the file under 8 MB.

However, I see address problems far more often than size problems:

  • Full URL: the og:image value has to start with https://. If you type a relative path like /img/cover.jpg, the tool shows a warning under the field.
  • Public file: the image must not sit in a folder that requires a login or one that crawlers cannot reach. If the Share card tab cannot load the image, check this first.
  • Key content in the centre: The small card may crop the image to a square. So keep text and logo near the middle.

The Open Graph protocol also says that a page with og:image should specify og:image:alt. The tool writes the alt text only when an image URL is present, and it adds the same text to twitter:image:alt. To resize or compress the file first, try the image resizer.

How do canonical and robots tags work together?

The canonical tag names the preferred version when several URLs lead to the same content. Google treats rel="canonical" as a strong signal, not as a strict command. Google's documentation gives three rules worth following:

  • Use absolute URLs rather than relative ones.
  • Place the tag only in the head.
  • Add a canonical on the preferred page that points to itself.

For the robots tag, the default is index,follow; writing it out has no effect, but it does no harm either. The tool offers three options:

  • Normal live pages: index,follow.
  • Internal search results or a thank you page, which stay out of the index while their links still count: noindex,follow.
  • Test pages or campaign drafts that should stay out entirely: noindex,nofollow.

Two more warnings apply here, however. Google cannot see a noindex rule on a page that robots.txt blocks from crawling. Also, Google does not recommend noindex as a way to steer canonical selection. You can build the robots.txt file with the robots.txt generator and your URL list with the XML sitemap generator. For the wider technical picture, read my technical SEO tips.

How do you add the meta tag generator code to your site?

Paste the code into the head section of the page, before the closing head tag. Google expects meta tags inside the head and as valid HTML. On a hand coded site, that is the only step. On a CMS or site builder, check the existing tags first:

  1. Open the page and view its source (Ctrl+U in Chrome).
  2. Search the source for title, canonical and og:image.
  3. If your theme or SEO plugin already writes these lines, do not add a second set. Instead, fill the plugin fields with the values from the tool.
  4. Copy only the missing lines, then confirm that each tag appears once in the source.

Check one detail in particular: og:url and the canonical should hold the same clean address. Meta defines og:url as the undecorated URL without session variables or tracking parameters, and likes and shares aggregate at that URL. So even if you tag campaign links with the UTM builder, keep UTM parameters out of these two fields.

Building a new site? In our web design projects, we wire these tags into the template for each page type. That way, nobody writes head code by hand when a new page goes live.

Why does a share preview stay outdated, and how do you refresh it?

Platforms crawl a link the first time someone shares it and then cache the result. Even after you fix the tags, the old title or image may keep showing for a while. Meta also notes that it caches images by URL. So, to update an image after publishing, use a new URL.

This is the order I follow:

  • Facebook: enter the link in the Sharing Debugger and ask it to scrape again. The debugger lists errors and re-crawls the page.
  • X: paste the link into the post composer; the card preview appears without publishing. X removed the preview from the old Card Validator page.
  • LinkedIn: enter the URL in Post Inspector so LinkedIn reads the page again.
  • New image: upload the new file under a new name and put that address in the og:image field.

If the preview still looks old, the cause is often the page itself. For example, a redirect may send the crawler to a different address. The redirect checker shows every hop the link takes.

Common mistakes when creating meta tags

  • MistakeEntering a relative path such as /img/cover.jpg as the og:image.Do this insteadUse the full address starting with https://; the tool warns you about relative paths and counts the field as missing.
  • MistakeUsing the same title and description on every page.Do this insteadWrite a title and description that describe each page; Google also points out that identical descriptions do not help in results.
  • MistakePasting a second set of tags while the theme or SEO plugin already outputs them.Do this insteadSearch the page source for title, canonical and og:image first; if they exist, use the tool only for the missing lines.
  • MistakePointing the canonical of every page to the home page.Do this insteadLet each page name its own URL as canonical; use a different URL only for genuine duplicates.
  • MistakeCarrying a noindex value from the staging site into production.Do this insteadBefore launch, confirm that the Robots field says index,follow and that the source holds no second robots line.
  • MistakeReplacing the image under the same file name and waiting for the preview to change.Do this insteadUpload the new image under a new file name, put that URL in og:image and re-scrape the page in the Sharing Debugger.

Frequently Asked Questions

Tags in place but traffic missing?

Meta tags are the foundation; rankings are decided by technical setup, content and authority. Get a quote for SEO consulting: share your site address and goal in the quote form, and we will send a written scope and quote.

Explore SEO Consulting

Related Tools

All Tools (91)
Robots.txt GeneratorBuild the right robots.txt in minutes with WordPress and e-commerce presets.
Image ConverterConvert between JPG, PNG and WebP in one click or in batches; it detects the input format, lets you set quality and a background for transparency, and uploads nothing.
Log File AnalyzerAnalyze server access logs in your browser: see what Googlebot and AI crawlers fetch, catch fake bots with official IP lists, and find crawl budget waste and sitemap gaps.
AI Visibility CheckerScore how ready a page is to be read and cited by ChatGPT, Perplexity and Google AI Overviews: AI crawler access, llms.txt, schema, citable structure and content without JavaScript.
Redirect Mapping ToolMatch broken or old URLs to the best live page in your sitemap by path and title similarity, with a confidence score, then export 301s for .htaccess, nginx or CSV.
WHOIS Lookup & Domain AgeSee who a domain is registered with, when it was created and expires, its exact age and whether it looks available. Free, no sign-up.