Control exactly how your links look on X
When a link is posted to X, the Twitter Card meta tags decide whether it appears as a flat URL or a polished card with an image, headline, and summary. This builder generates every tag X reads, lets you pick between the compact and large-image layouts, and shows a live preview so you can see the result before you ship.
The two card types and when to use each
summary — A small square thumbnail appears to the left of the title and description. Use this for text-heavy content where the image is secondary: news articles with generic header photos, blog posts, documentation pages, or any link where the headline and description communicate more than the visual.
summary_large_image — A large full-width image appears above the title and description, occupying significantly more feed space. Use this for anything visual: product pages, marketing announcements, photography, video thumbnails, or any content where the image itself communicates value. Most publishers default to this type because larger cards earn more clicks.
What each tag does
The tool emits the Twitter Card tags in the order the crawler expects:
twitter:card— tells X which card layout to use (summaryorsummary_large_image).twitter:title— the headline text (keep under ~70 characters; X truncates beyond that).twitter:description— the summary below the title (keep under ~200 characters).twitter:image— the preview image URL. Must be publicly reachable overhttps.twitter:image:alt— accessible alt text for the image (also helps the card pass accessibility audits).twitter:site— the@handleof the website or publisher (used for follow prompts and attribution).twitter:creator— the@handleof the individual author (optional but recommended for bylined content).
The tool normalises handles to start with @ and HTML-escapes all values so quotes and ampersands in your copy cannot break the generated markup.
How to use the output
- Copy the generated tag block from the tool.
- Paste it into the
<head>element of your page, alongside any existing Open Graph tags. - Deploy and then test the URL in X’s Card Validator (cards.twitter.com/validator) to force a fresh crawl and confirm the card renders correctly.
X caches card data, so a new URL typically previews immediately, but changes to an existing URL can take a few hours to propagate after a re-crawl.
Tips
- Default to
summary_large_imagefor anything visual — it occupies more feed real estate and earns more engagement. - Always host the image at a public
httpsURL. Images behind authentication, served over plainhttp, or blocked by robots.txt will not render. - If both Open Graph tags and
twitter:tags are present, X uses thetwitter:tags. If only Open Graph is present, X falls back to those. This builder outputs dedicatedtwitter:tags for precise control. - For
summary_large_image, use a 2:1 aspect ratio image (for example 1200×600 pixels) at minimum 300×157 pixels. Smaller images trigger a fallback to the compact card layout.