Skip to main content
toolsxulo

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 tags
<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

  1. Choose a type in twitter:card: "Summary with large image" (the default) or "Summary".
  2. 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 @.
  3. Copy the <meta> block, or press "Download .html", and paste the tags into the page's <head>.

Examples

Card type left at the default (summary_large_image). twitter:title: New Product Launch. twitter:description: A new armchair collection, ships nationwide. twitter:image: https://www.example.com/images/chair.jpg. twitter:site: myshop<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:title" content="New Product Launch" /> <meta name="twitter:description" content="A new armchair collection, ships nationwide." /> <meta name="twitter:image" content="https://www.example.com/images/chair.jpg" /> <meta name="twitter:site" content="@myshop" /> The tool added @ to the account name. The card type stayed at the default, summary_large_image.
Only twitter:title: New Product Launch, with the type left at the default<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:title" content="New Product Launch" /> Even without a description, image, or account, the twitter:card line is included with the selected value.
Type summary. twitter:title: How to write a robots.txt file. twitter:description: Allow, Disallow and Sitemap lines. twitter:image: https://www.example.com/images/robots.jpg. twitter:site: @example<meta name="twitter:card" content="summary" /> <meta name="twitter:title" content="How to write a robots.txt file" /> <meta name="twitter:description" content="Allow, Disallow and Sitemap lines." /> <meta name="twitter:image" content="https://www.example.com/images/robots.jpg" /> <meta name="twitter:site" content="@example" /> With the summary type, this tool's preview shows a small square next to the text, not a wide banner.

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.

Related tools