Twitter Card Generator
Enter a title, description, image, and site account, choose a card type, and get twitter: meta tags to paste into the <head>. The page also shows an approximate preview of the card.
Preview
Page title
<meta name="twitter:card" content="summary_large_image" />
How it works
Twitter Card tags are meta lines in the page's <head>, with a name that starts with twitter:. This tool builds them from the fields: twitter:card, twitter:title, twitter:description, twitter:image, and twitter:site. An empty field is left out of the output. The card type starts as summary_large_image, so a twitter:card line is always included with the value you selected.
There are two types. In this tool's preview, summary_large_image shows a wide 2:1 image above the text, and summary shows a small square next to the title and description. That preview is an approximate card on this page, not the live scrape on X.
If you type a twitter:site handle without @, the tool adds it, so myshop becomes @myshop. The image URL is left as you typed it; a relative path such as /card.png is not turned into a full URL. If the title or description contains ", &, or angle brackets, they are escaped as HTML entities. The tool only generates HTML tags. It does not publish the card or refresh X's cache.
How to use it
- Choose a type in twitter:card: "Summary with large image" (the default) or "Summary".
- Enter a title, a description, and an image URL. The card on the right updates as you type. You can also add a twitter:site account, with or without @.
- Copy the <meta> block, or press "Download .html", and paste the tags into the page's <head>.
Examples
Frequently asked
- What is the difference between the two card types?
- In this tool, "Summary with large image" (summary_large_image) shows a wide 2:1 image above the text, and "Summary" (summary) shows a small square next to the title and description. The tool does not check how the card will actually be scraped on X.
- Do I need to fill in every field?
- No. An empty field is omitted from the output, except twitter:card, which is always included with the selected value (default: summary_large_image).
- What does twitter:site do?
- It is the field for the site's account. If you type it without @, the tool adds one. If you leave it empty, that tag is not written.
- Why should the image URL be absolute?
- The tool does not rewrite what you type. A relative path such as /card.png stays that way in the tag. If you want an address a crawler can request, paste a full URL that starts with https://.
- Are these the same as Open Graph tags?
- No. This tool writes tags whose name starts with twitter:. Open Graph tags are a separate set of property="og:…" lines. They can appear on the same page, but this tool does not generate og: tags.
- Where do I paste the tags?
- In the page's <head>. After you publish, check the link in the debugger of the network you share to; this tool does not refresh a cache.