Meta Tag Generator

Build SEO, Open Graph, and Twitter/X card tags with live previews and copy-ready HTML.

Search engine basics

Search result preview

example.comexample.com
Your page title appears here
Your meta description appears here. Search engines may show it as the snippet below your title.

Approximation only: real results truncate by pixel width and may rewrite titles and snippets.

Social card preview

Generated HTML


      
      

Paste these tags inside your page's <head>, keeping <meta charset> first. Special characters are HTML-escaped for you.

Generated entirely in your browser — nothing you type is uploaded or stored.

Advertisement

How to Use This Meta Tag Generator

Fill in the fields that apply to your page; anything you leave blank is simply left out of the output. Start with the page title and meta description, since those are what people see first in search results. Add the full canonical URL of the page, then decide whether you need a robots directive. The Open Graph and Twitter/X sections are switched on by default because nearly every page gets shared somewhere. Their title, description, and URL fields fall back to the values you already entered, so you only need to fill them in when the social version should say something different.

As you type, the character counters update, the search and social previews redraw, and the Generated HTML box rebuilds the tag list. Warnings appear underneath when something is likely to cause a problem, such as a relative image URL or a large-image card with no image. Click Copy and paste the result inside the <head> of your page, or into the head template of your CMS or static site generator. Quotes, ampersands, and angle brackets in your text are converted to HTML entities automatically, so a title like Tips & "Tricks" cannot break the markup.

What Each Tag Does

  • <meta charset="UTF-8"> tells the browser how the bytes of the page are encoded. It should be the first element inside <head>, because the HTML standard requires the declaration to appear within the first 1,024 bytes of the document.
  • Viewport, width=device-width, initial-scale=1, makes mobile browsers lay the page out at the device's width instead of pretending to be a desktop screen. Without it, responsive CSS does not behave as intended on phones.
  • <title> names the document in browser tabs, bookmarks, and history, and is the usual source of the clickable headline in search results.
  • Description is a short summary that search engines often, but not always, show under the title.
  • Canonical is a <link> element rather than a meta tag. It names the preferred URL when the same content is reachable at several addresses, for example with tracking parameters or both with and without a trailing slash.
  • Robots gives crawlers instructions such as noindex (keep this page out of results) or nofollow (do not follow its links).
  • Theme color lets supporting mobile browsers tint their toolbar to match your brand.

Title and Description Length: Guidelines, Not Rules

Advertisement

You will often see advice to keep titles under 60 characters and descriptions under 160. Those numbers are approximations. Search engines truncate by the pixel width of the text, not by character count, so a title full of wide letters like W and M is cut sooner than one with narrow letters like i and l, and the limits differ between desktop and mobile layouts. The counters on this page use ranges of roughly 50–60 characters for titles and 120–160 for descriptions as a practical target, and the preview cuts text at a similar point, but neither can predict exactly where a real result will end.

More important than hitting a number is front-loading meaning. Put the words that identify the page at the start of the title, followed by qualifiers and then your brand name, so a truncated title still tells people what they will get. Write descriptions as a plain summary of what the page offers. Google has stated that the meta description is not used as a ranking signal and that it may generate its own snippet from page content when that better answers a particular query, so think of the description as an advertisement for the click rather than as a place for keywords.

Open Graph and Twitter Cards for Link Previews

When someone pastes your URL into a chat app or social network, a crawler fetches the page and looks for Open Graph tags to build the preview card. The protocol was published by Facebook and has been adopted widely, which is why the same tags drive previews on LinkedIn, Slack, Discord, and many messaging apps. The four core properties are og:title, og:type, og:image, and og:url; og:description and og:site_name are optional but almost always worth including.

X (formerly Twitter) reads its own twitter: tags first and falls back to Open Graph for the title, description, and image. That is why this generator outputs twitter:card and your handles, but only adds twitter:title, twitter:description, or twitter:image when you enter values that differ from the Open Graph ones. Choose summary_large_image for a full-width image above the text, or summary for a small square thumbnail beside it.

Images cause most preview problems. Use an absolute https:// URL, because crawlers do not resolve relative paths against your page. A 1200 × 630 pixel image (an aspect ratio of about 1.91:1) is a common choice for large cards; keep important text and logos toward the center, since some platforms crop to a different shape. Add og:image:alt so people using screen readers know what the image shows.

Canonical URLs and Robots Directives

A canonical tag is a strong hint, not a command. Point it at the exact URL you want indexed, including the protocol and host, and make sure that URL returns the page itself rather than a redirect or an error. Every indexable page can safely declare itself as canonical. Avoid pointing many different pages at your home page; search engines generally ignore canonicals that do not match the content.

The robots meta tag defaults to index, follow, which is why this tool omits it unless you pick something else. Use noindex for pages that should exist but not appear in search, such as order confirmations, internal search results, or staging copies. Remember that a crawler must be able to fetch the page to see the tag; if robots.txt blocks the URL, a noindex in the HTML will never be read. Combining noindex with a canonical pointing elsewhere sends contradictory signals, so the generator warns about it.

Testing and Troubleshooting Your Tags

After publishing, view the page source to confirm the tags are in the <head> and appear exactly once. Duplicate titles or descriptions often come from a theme and a plugin both inserting them. Social platforms cache previews aggressively, so an old image or title can persist after you fix the tags; most offer a sharing debugger or post inspector that fetches the page again. If a preview shows no image at all, check that the image URL loads in a private browser window, is not blocked by authentication or hotlink protection, and is served over HTTPS.

Keep in mind that tags you add by JavaScript after the page loads are often missed, because many link-preview crawlers read only the HTML the server sends and do not run scripts. If your site is a single-page application, render meta tags on the server or at build time. Finally, remember that tags describe content rather than replace it: a clear title and description help people choose your page, but the page itself still has to deliver what they promise.

Frequently Asked Questions

How long should a title tag be?

There is no fixed limit, but Google truncates titles that are wider than the result column, which in practice is often around 50 to 60 characters. Treat that as a guideline: put the most important words first so the title still makes sense if it is cut off, and do not pad a short title just to reach a number.

Does the meta description affect rankings?

Google has said the meta description is not a ranking factor. It still matters because it is often used as the snippet under your title, and a clear, specific description can make people more likely to click. Google may also write its own snippet from the page text when it thinks that better matches the search.

What is the difference between Open Graph and Twitter Card tags?

Open Graph tags (og:title, og:image and so on) were introduced by Facebook and are read by most platforms that build link previews, including LinkedIn, Slack, Discord, and iMessage. Twitter Card tags control previews on X. X falls back to the Open Graph values when its own title, description, or image tags are missing, so you usually only need twitter:card plus any values you want to be different.

What size should an og:image be?

A 1200 × 630 pixel image (about 1.91:1) is a widely used size for large link previews. Use an absolute https URL, keep important text away from the edges because some platforms crop to a square or a different ratio, and keep the file reasonably small so crawlers fetch it quickly.

Do I need the robots meta tag?

Only when you want to change the default. Search engines assume index, follow when the tag is absent, so this generator leaves it out unless you choose something else, such as noindex for a thank-you page or an internal search results page.

Is the information I type sent anywhere?

No. The tags and previews are generated by JavaScript in this page. The only optional network request is the social card image preview, which, if you switch it on, asks your browser to load the image from the URL you entered.

Related Articles

Expert guides and educational resources to help you master the math.

Advertisement