Meta Tag Generator
Generate head tags: title, meta description, canonical, robots, Open Graph and Twitter card, with HTML escaping and title and description length warnings.
Worked examples
- A complete landing page
Title, description and canonical for search, the four required Open Graph properties for link previews, and a large-image Twitter/X card that reuses the Open Graph values.
- Values with quotes and ampersands, and length warnings
Quotes, ampersands and angle brackets are HTML-escaped so they cannot break the attribute, and the tool flags the over-long title and description and the missing og:image.
- A staging page that must stay out of search
A minimal head with a robots directive: the tool warns that noindex removes the page from search results, which is the point here but easy to ship to production by accident.
What this tool does
This tool writes the <head> tags a page needs for search results and link previews: the title, meta description, canonical link, an optional robots directive, the Open Graph tags that Facebook, LinkedIn, Slack and most chat apps read, and a Twitter/X card. Every value is HTML-escaped, and a warnings box points out missing or over-long fields before you paste the result into your template.
When you need it
- Launching a page or site and wanting a correct baseline head without remembering each attribute name.
- Debugging a link that shows no image or the wrong title when shared.
- Marking staging, thank-you or filtered pages
noindex. - Checking how to write a value containing quotes, ampersands or angle brackets without breaking the HTML.
What each tag does
<title> is the main text of the result in Google, the browser tab label and the default share title. meta name="description" is a candidate for the snippet under the title. Google's documentation says it may use the description if it describes the page better than text taken from the page, and it frequently writes its own snippet to match the query. A good description is therefore worth writing, but it does not guarantee what is shown, and it is not a ranking signal. link rel="canonical" tells search engines which URL is the preferred version when the same content is reachable at several addresses. It is a strong hint rather than a command.
meta name="robots" accepts directives such as noindex (keep the page out of search results) and nofollow (do not follow its links). The tool warns when noindex is set because it is easy to ship from staging to production by accident. Remember a page blocked in robots.txt cannot be crawled, so a crawler never sees its noindex; use one or the other deliberately.
Open Graph and Twitter/X cards
The Open Graph protocol defines four required properties: og:title, og:type, og:image and og:url. The tool also writes og:description and optionally og:site_name and og:image:alt. For og:type it offers website, article, book and profile, the values from the protocol that do not require extra properties to be valid (article, book and profile can optionally add their own, such as article:published_time, which this tool does not write). Open Graph uses the property attribute, while Twitter uses name, a distinction people often get wrong, and the generator writes each correctly.
For X (Twitter) you only need twitter:card (summary for a small square image, summary_large_image for a wide one) on top of Open Graph, because X reads og:title, og:description and og:image when the Twitter-specific tags are absent. The tool follows that: with Open Graph on it writes just the card type and optional twitter:site; with Open Graph off it writes the full set of twitter: tags instead.
The 60 and 160 character warnings
Google does not publish a character limit. It truncates titles and snippets according to the pixel width they occupy in the results page, which works out to about 60 characters for a title and about 155 to 160 for a description on desktop. Wide letters like W use more room than i, so treat the warnings as a rule of thumb and put the important words first. A longer title is not penalized in ranking; it may just be cut off, and Google sometimes rewrites titles it considers poor.
Why there is no keywords tag
Google has stated since 2009 that it does not use the meta keywords tag in web search ranking, and Bing has said it does not use it for ranking either. It adds bytes and shows competitors your target terms, so the generator omits it.
Escaping
Values go into double-quoted attributes, so &, <, >, " and ' are converted to &, <, >, " and '. Without this, a title like Tom & Jerry's "Guide" would end the attribute early or produce invalid markup. A URL such as ?a=1&b=2 is written with &, which is the correct way to put it in HTML and which browsers decode back to &. Line breaks, tabs and runs of spaces in the title, description, image description and site name are collapsed to single spaces, because a pasted multi-line value would otherwise land in the tag verbatim. The lengths shown count characters, so an emoji counts as one.
Limits
Canonical and image URLs must be absolute, starting with http:// or https://. The tool does not fetch your page or check that the image exists, and it does not write JSON-LD structured data.
Frequently asked questions
- Why is there no meta keywords tag?
- Google has said since 2009 that it does not use the meta keywords tag in web search ranking, and Bing has said it does not use it for ranking either. It adds weight to the page and shows competitors your target terms, so this generator leaves it out.
- Does Google use my meta description?
- Sometimes. Google's documentation says it may use the meta description as the snippet when it describes the page better than text taken from the page itself, and it often rewrites snippets to match the query. A good description still helps, and it is what most link-preview scrapers read, but it is not a ranking factor.
- What are the 60 and 160 character warnings based on?
- They are rules of thumb, not limits. Google truncates titles and snippets by rendered pixel width, which works out to roughly 60 characters for a title and 155 to 160 for a description, and the cutoff varies with the characters used and the device. Longer text is not penalized in ranking, it may just be shortened in the results.
- Do I need both Open Graph and Twitter card tags?
- Only twitter:card is needed in addition to Open Graph. X reads og:title, og:description and og:image when the twitter: equivalents are missing, so the generator emits just the card type and optional site handle when Open Graph is on. If you turn Open Graph off, it writes out the twitter: tags in full.