The Twitter Card Generator writes the twitter: meta tags that control how a page looks when its link is shared on X (Twitter). Choose the card type (a large image above the text, or a small square image beside it), enter the title, description and image address, and add the site and author accounts if you like. The code appears below the form with a copy button. The @ sign is added for you and never doubled, and the text is escaped. It runs in your browser.
Made for marketers and seo. Typical uses:
With the card type summary_large_image, the title T, the description D, the site account acme and the author account jane, the tool writes twitter:card, twitter:title, twitter:description, twitter:site (@acme) and twitter:creator (@jane). Adding an image address adds twitter:image and, if you describe it, twitter:image:alt.
It writes tags only: there is no preview, and it does not check that your image loads or meets X's size rules. App and player cards, which need extra fields, are not supported. X caches link previews, so a changed page may keep showing the old card for a while.
Accuracy: Results show what the tool can measure at the moment you run it and can differ from what search engines see. Use them as guidance.
Expert Tip
If your page already has good Open Graph tags, X will use them, so you only need the twitter:card tag; add the other tags when you want different text or want to name the site and author accounts. Test by pasting the link into a draft post.
Twitter Cards, which X still uses under the same name, control how a link looks when it is shared on X: a title, a description and an optional image. The Twitter Card Generator writes the meta tags as you type. Choose the card type, enter the title and description, add an image address and, if you like, the site and author accounts. The code appears below the form with a copy button, ready to paste into the head of your page.
The tool offers the two types that most pages need.
With the card type summary_large_image, the title T, the description D, the site account acme and the author account @jane, the tool writes the twitter:card, twitter:title, twitter:description, twitter:site and twitter:creator tags, and adds twitter:image and twitter:image:alt when you give an image. The @ sign is added for you if you leave it out and is never doubled if you type it, so @jane and jane give the same tag. Fields that you leave empty are left out.
The title is limited to 70 characters and the description to 200, and the form stops you at those lengths. The image alt text can be up to 420 characters. According to X's documentation, large-image cards need an image with a ratio of about 2 to 1, at least 300 by 157 pixels, and the summary card a square image of at least 144 by 144 pixels, with both under 5 MB. The image must be available at a public address that starts with https://.
X falls back to Open Graph tags when a Twitter tag is missing. A page that already has good og:title, og:description and og:image tags therefore needs only the twitter:card tag, and the other Twitter tags are useful when you want different text on X or want to name the site and author accounts. Write the Open Graph tags with the Open Graph Generator, or get both sets together from the Meta Tag Generator.
X caches link previews, so a card you have changed may keep showing the old version for a while. X has retired its old Card Validator, so the practical test is to paste the page address into a draft post and look at the preview, without publishing it. If the image does not appear, check that the address is public and uses https. For help with writing the text, see the Meta Title Generator and the Meta Description Generator. Everything is generated in your browser.
Explore more in SEO Tools, read the guides and articles, or see how we test our tools.
Generate Open Graph meta tags for social media sharing.
Best for controlling the title, description and image shown when a page is shared
Preview how your webpages appear when shared on Facebook, Twitter, and LinkedIn.
Best for checking a new blog post's share card before announcing it on social media
Generate SEO-optimized meta tags for your web pages.
Best for creating SEO meta tags for new web pages
Generate SEO-optimized title tags for your web pages.
Best for drafting a title for a new page from a keyword
Generate SEO-optimized meta descriptions for your web pages.
Best for drafting a starting-point meta description for a new blog post