SEOLyzerPro
Use 47 free online tools: meta tag and robots.txt generators, image and text tools, JSON converters, calculators and unit converters. No signup needed
Twitter Card Generator
Create Twitter (X) card meta tags for your page
Twitter Card Generator
What this tool does
The Twitter Card Generator creates the meta tags that control how your page looks when a link is shared on Twitter, now called X. With these tags, a shared link can show a title, a short description and an image in a clean card, instead of plain text. You fill in the card type, title, description and image, and copy the generated code into your page’s head section. The tags still use the name “twitter”, as the card format has kept its original naming.
How to use it
- Choose the card type.
- Enter the title and the description.
- Add the full address of the image.
- Optionally add the account handles for your site or the author.
- Generate the code and paste it into the head section of the page.
What the code looks like
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Free Word Counter">
<meta name="twitter:description" content="Count words, characters and sentences as you type.">
<meta name="twitter:image" content="https://www.example.com/images/word-counter.jpg">
<meta name="twitter:site" content="@yourhandle">
[Replace this with a sample from your own tool, and use your real handle only if you have one.]
Card types
Summary card. A small square image beside the title and description. It suits articles, general pages and tools. The image should be square, at least 144 × 144 pixels, with a recommended ratio of 1:1.
Summary card with large image. A wide image above the title and description, which takes more space in the feed and tends to attract more attention. The image should have a 2:1 ratio, and a size of about 1200 × 600 pixels works well. The minimum is 300 × 157 pixels and the maximum 4096 × 4096 pixels.
Both card types limit the image file size to about 5 MB. Other older card types, such as app and player cards, have more specific requirements, and you should check the current X developer documentation before using them.
The tags explained
- twitter:card sets the card type, for example summary or summary_large_image.
- twitter:title is the headline. X documents a limit of about 70 characters.
- twitter:description is the supporting text. Up to about 200 characters can be used, and X may show fewer depending on the card.
- twitter:image is the picture, given as a full web address.
- twitter:image:alt is optional alternative text for people who use screen readers, and it is good practice to include it.
- twitter:site is the handle of your website’s account, and twitter:creator is the handle of the author.
Relationship with Open Graph
X can use Open Graph tags as a fallback when Twitter Card tags are missing. If a page has og:title, og:description and og:image, X may still produce a card. In practice the minimum is usually the twitter:card tag, and the rest can come from Open Graph. Having both gives you the most control, and lets you use different wording or images for X if you wish. Generate both with this tool and the Open Graph Generator.
Writing a good card
- Start with the most important words, since long titles may be cut off.
- Use a clear image with little text, and keep key content away from the edges.
- Describe the real content of the page. Misleading cards harm trust.
- Make the image look good at small sizes, because many people see it on a phone.
- Use JPG, PNG or WebP files for the image. Animated GIFs are not animated in cards, and SVG is not supported.
Testing and updates
After you add the tags, share the link in a post or use a card preview tool, if one is available to you, to see how it will appear. X caches card data, so changes to a page may take some time to show for links that were shared before. If your preview looks wrong, check that the image address opens in a browser without a login, that the file is not too large, and that your robots.txt file does not block the image.
Common problems
- No card appears. The twitter:card tag may be missing or the page may not be publicly reachable.
- Image does not show. The address may be wrong, blocked or larger than the limits.
- Wrong image. A theme or plugin may add duplicate tags that conflict. Keep one source.
- Image cropped badly. Use the recommended ratio for the card type and keep the subject centred.
- Old content shows. The platform is using its cache.
Where to put the code
Place the tags inside the head section of your page. If you use WordPress, an SEO plugin often has settings for social tags, so check whether it already adds them to avoid duplicates. For custom sites, add them to your page template and fill in values for each page.
Limits of this tool
The generator creates the tags. It does not host your image, publish the code, or control how X chooses to display a link. Platform rules, limits and tools can change, and some users may see links differently depending on their app or device.
Frequently asked questions
Do I still need Twitter Card tags now that it is called X?
The tags still work, and the names have not changed, so they remain the way to control cards.
Which card type should I use?
Use the large image card when you have a strong image, and the summary card when you do not.
Can I skip Open Graph if I use Twitter Cards?
It is better to have both, because other platforms use Open Graph.
What image size is best?
About 1200 × 600 pixels for the large card, and at least 144 × 144 pixels for the summary card.
Related tools
Open Graph Generator, Meta Tag Generator, Meta Tags Analyzer, Image Converter, Image Resizer and YouTube Tag Generator.