Add to Chrome Add to Edge

Twitter Card Generator

Generate the meta tags that control how your links look when shared on X (Twitter).


Next step

  1. Open Graph Checker icon

    Open Graph Checker

    Check the tags on the live page

  2. SERP Snippet Preview icon

    SERP Snippet Preview

    Preview your title and description in Google

  3. SEO Tags Generator icon

    SEO Tags Generator

    Generate the title and meta tags too


Twitter Card Generator

Twitter Cards, now called X Cards, are meta tags in the <head> of a page that control how a link looks when someone posts it on X: the image, the title and the description. Fill in your page title, description, image URL and username, click Generate, and you get the tags ready to paste into your page. The generator builds a large image card (summary_large_image), the card type most sites use for articles, products and landing pages.

How to use Twitter Card Generator

  1. Enter the Site Title, ideally the title of the page you are tagging.
  2. Enter your X Username, with or without the @. It is optional.
  3. Enter the full Image URL, starting with https://.
  4. Write a short Description of the page.
  5. Click Generate, copy the tags and paste them inside the <head> of the page.

Example

For a blog post, the result looks like this:

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@yourbrand">
<meta name="twitter:title" content="How to Compress Images for the Web">
<meta name="twitter:description" content="Smaller images, faster pages: formats, sizes and settings.">
<meta name="twitter:image" content="https://example.com/images/compress-guide.jpg">

Quotes and angle brackets in your text are escaped, so a title like The "Best" Tools does not break the tag.

Which tags X needs

twitter:card is the only tag X really needs from this list, because it has no Open Graph equivalent. For the title, description and image, X falls back to the Open Graph tags (og:title, og:description, og:image) when the Twitter versions are missing. If your page already has Open Graph tags, adding twitter:card is often enough; if it has none, add both sets so Facebook, LinkedIn and messaging apps show a good preview too. The SEO Tags Generator creates the Open Graph tags.

Choosing the image

  • Large image cards use a 2:1 ratio. 1200 × 600 pixels fits exactly; a 1200 × 630 Open Graph image also works and is cropped slightly.
  • X accepts JPG, PNG, WebP and GIF (only the first frame of an animated GIF is used) up to 5 MB.
  • Use a full, public URL. Images behind a login, or blocked for X's crawler in robots.txt, do not show.
  • Keep important text away from the edges, and remember that X shows large cards with your domain over the image, so the picture has to carry the message.

To get the image to the right size, use the Image Cropper or the Image Resizer.

Testing your card

X's Card Validator no longer shows a preview. To check a card, paste the link into a new post on X and look at the preview before you post, or run the page through the Open Graph Checker, which reads the Twitter and Open Graph tags the way social networks do. X keeps card data for a while, so a change to an image or title may not appear on a link that was shared before.

Frequently asked questions

What image size works best?
1200 × 600 pixels (2:1) for a large image card, as JPG, PNG or WebP under 5 MB, on a public URL that does not require a login.
Do I need an X account?
No. The username fills the optional twitter:site tag, which links the card to your account. Leave it empty and the tag is left out; the card still works.
Do Twitter Cards help SEO?
Not in Google. The tags are not a ranking factor. They make your links look better on X, which can bring more clicks and visits from people who see them there.
Why does my old preview still show?
X caches card data when a link is first shared. New posts of the link pick up your changes after the cache expires; adding a harmless query string such as ?v=2 to the link makes X fetch it fresh.
Where do the tags go in WordPress?
SEO plugins such as Yoast SEO and Rank Math add Twitter and Open Graph tags for you. Use them, or paste the tags into your theme's header, but not both, or the page gets duplicate tags.

Related guides

Choose which cookies SEOpeck may use. You can change this at any time from "Cookie settings" at the bottom of every page.

Your tools

    Saved in this browser only. Nothing is sent to us.

    Popular tools