Meta Tag Generator for SEO & Social Media

Used for the main <title> tag and social cards. Aim for under 60 characters.
Used for SEO and social cards. Aim for under 160 characters.
The full, absolute URL of the page.
Full URL for the social sharing image. Recommended size: 1200x630 pixels.
Your personal or brand Twitter/X username (e.g., @twitter).

Social Card Preview

Generated HTML

Using the Meta Tag Generator

This tool helps you create HTML <meta> tags for your webpage. Correct meta tags are important for search engine optimization (SEO) and for controlling how your content appears when shared on social media platforms like Facebook, Twitter, and LinkedIn.

  1. Fill in the Form: Enter your page's title, description, URL, and an image URL. The Twitter/X handle is optional but recommended.
  2. Check the Preview: The social card preview gives you an idea of how your link might look when shared.
  3. Copy the Code: The generated HTML code contains all the necessary tags. Click the "Copy" button and paste the code into the <head> section of your HTML document.

Understanding the Meta Tags

Here is a breakdown of what each generated tag does:

Basic SEO Tags

  • <title>: The main title of your document. It appears in the browser tab and as the headline in search engine results.
  • <meta name="description">: A summary of the page's content. Search engines often use this for the snippet in search results.
  • <link rel="canonical">: Tells search engines the "preferred" version of a URL. This is important for preventing duplicate content issues.

The Open Graph Protocol (for Facebook, LinkedIn, etc.)

The Open Graph protocol enables any web page to become a rich object in a social graph. These tags control how your content is displayed when shared.

  • og:type: The type of your object. For a standard webpage, this is website.
  • og:url: The canonical URL of your page.
  • og:title: The title that will be displayed in the social share card.
  • og:description: The description that will be displayed.
  • og:image: The URL of the image that will be shown in the card. This is arguably the most important tag for engagement.

Twitter Cards

Twitter/X has its own set of meta tags, though it will often fall back to Open Graph tags if its own are not present. It is best practice to include them for optimal display on Twitter/X.

  • twitter:card: The type of card to display. summary_large_image is the most common and effective type.
  • twitter:url: The page's canonical URL.
  • twitter:creator: The @username of the content creator or author.
  • twitter:title: The title for the Twitter card.
  • twitter:description: The description for the Twitter card.
  • twitter:image: The image for the Twitter card.

Best Practices for Meta Tags

  • Be Concise: Keep titles under 60 characters and descriptions under 160 characters to avoid them being truncated in search results and social shares.
  • Use Absolute URLs: Always use the full, absolute URL (including https://) for your URL and image tags to avoid ambiguity.
  • Optimize Your Image: The recommended size for an Open Graph image is 1200x630 pixels. Ensure the image is high quality and relevant to the content.
  • Test Your URL: After publishing your page, you can use official tools like the Facebook Sharing Debugger and the Twitter Card Validator to see exactly how your page will be shared.