Meta Tag Generator

Build a complete and correct set of meta tags for a page. The output includes the title, the description, the keywords, the robots directive, the canonical link, the Open Graph properties and the Twitter card tags, followed by a length report that tells you which of them still needs to be shortened.

Input

Meta tags


            
            

Ready — paste some input or load the sample.

100% Client-Side · Privacy First. This tool runs entirely inside your browser. Nothing you type is uploaded, logged or sent to a server — you can even use it offline.

Overview

The meta tags at the top of a page decide what a search engine shows in the blue link, what a social network shows when somebody shares the link, and how a crawler is allowed to treat the page. They are also where most of the low-hanging SEO wins are, because the title and the description are what people actually read before deciding to click. This generator produces the full set from a title and a description: the primary title and description, robots directives, an optional canonical link, the Open Graph properties that Facebook and LinkedIn read, and the Twitter card tags. It escapes the values, so a title containing an ampersand or a quotation mark cannot break the markup, and it reports the length of both the title and the description with a warning when they are likely to be truncated in the search results. The keyword list and the author are included when you provide them.

How to use the meta tag generator

  1. 1Enter a page title and a meta description.
  2. 2Add a canonical URL, an image URL and a Twitter handle if the page needs them.
  3. 3Read the length report and shorten a title or a description that is too long.
  4. 4Copy the generated block into the head of your page, above any stylesheet link.
  5. 5Keep the same block on every version of the page, so that a canonical URL always points at one of them.
  6. 6Check the length report before you publish, because a truncated description is the most common meta tag mistake.

Cheat sheet

The syntax you will use most, and what each part does.

PatternWhat it means
<title> The title tag, ideally between 50 and 60 characters so it is not truncated.
meta name="description" The description, ideally between 140 and 160 characters.
meta name="robots" Defaults to index, follow, which lets the page be indexed and its links followed.
link rel="canonical" Tells the search engines which URL is the real one when the same page is reachable under several addresses.
og:title and og:description The Open Graph tags that Facebook, LinkedIn and Slack use for the share preview.
twitter:card summary_large_image when an image is set, otherwise the plain summary card.

Common mistakes

The description never shows in Google.

Google rewrites a description it does not like, and it often ignores the one you wrote. A description that matches the search intent still earns its click.

The title is cut off.

Keep it under about 60 characters. The important words go first, because the truncation happens at the end.

The page is indexed twice.

Add a canonical link pointing at the preferred URL whenever the same content is reachable under more than one address.

The share preview has no image.

Set an image URL and the preview becomes a large image card. Without one you get a small link with no picture.

Worked examples

A blog post

title: How to cache a static site
description: A practical guide to content hashing, immutable headers and cache busting for Cloudflare Pages.

A head block with the title, the description, the robots directive, the Open Graph tags and the Twitter card.

A page with a canonical URL

title: JSON to YAML converter
description: Convert JSON to YAML in your browser.
canonicalUrl: https://tools.cesarcai.dev/json-to-yaml/

The same block plus a canonical link and the matching og:url property.

Frequently asked questions

Does the meta keywords tag still matter?

No. Search engines have ignored it for years, and a keyword list that only repeats the description adds nothing. The block still emits it for compatibility with older systems and internal tools, but it is not a ranking factor.

How long should the title and description be?

Around fifty to sixty characters for the title and around one hundred and fifty for the description. Beyond that the search result truncates the text, and the report in the output marks every value that is over the limit.

Should the title and the h1 be identical?

They should be close but not identical. The title is a search result snippet that has to earn the click, while the h1 is a heading that has to orient the reader who already arrived.

Is the generated markup safe to paste?

The values are escaped, so a quote in a title cannot break out of the attribute. The markup itself is plain and standard, and it validates against the usual SEO checkers.

Why do I need a canonical link?

It tells the search engines which URL is the original when the same content is reachable under several addresses, such as a page with and without a trailing slash or with tracking parameters.

What does the open graph block do?

It controls how the page looks when it is shared on a social network. The image and the title are what people actually see, and a missing image is the reason a share often looks empty.

Should I use summary or summary_large_image for the twitter card?

Use summary_large_image when you have an image of at least eight hundred by five hundred pixels, because it produces the large preview. Plain summary is the safe choice when there is no image.

Do I need a robots directive at all?

No, indexing is the default, so the tag is optional. It becomes useful when a page must not be indexed, or when you want to allow the snippet but keep the page out of the index.

Does the title tag affect the ranking?

It is one of the strongest on-page signals, because it tells the search engine what the page is about and it is what a person reads before deciding to click.

Should the keywords tag be removed?

You can remove it without any loss, because no major search engine has used it for many years. Leaving it in is harmless as long as it does not contradict the page.

What is the maximum length of an image URL?

There is no hard limit in the specification, but a very long URL can be truncated by the social network that renders it. Keep it short and make sure the image itself is at least eight hundred by five hundred pixels.