Skip to content
🐦

Twitter Card Generator

Generate Twitter Card meta tags for rich sharing on X (Twitter).

Runs in your browser

Updated

What the generator writes

You pick a Card Type from Summary, Summary with Large Image, App or Player, then fill Site, Creator, Title, Description and Image URL. Each field edit rebuilds a snippet in a read-only box beside a Copy Tags button. Every card gets a twitter:card tag plus twitter:title and twitter:description; site and creator are added only when filled, and the image is added only when a URL is present and the card is not an App card.

A worked example

Leaving every field at its shipped value gives a card type of summary, a site of @mywebsite, a creator of @creator, the title My Page Title, the description Description for Twitter card. and the image https://example.com/image.jpg. Those flow into six meta tags in that fixed order, ready to paste into a page head.

App and Player cards

Choosing App swaps the image field for iPhone and Google Play name and ID boxes, and writes twitter:app:name:iphone, twitter:app:id:iphone and the googleplay pair when they are filled. Choosing Player reveals a player iframe URL plus width and height, and writes twitter:player, twitter:player:width and twitter:player:height. A note under the card type lists whatever the selected card still needs, such as an image URL, one complete platform pair, or the player URL and dimensions.

Where it stops

  • Every value is escaped for ampersands, angle brackets and double quotes, but no length limit is applied, so an over-long title is copied as written.
  • There is no twitter:image:alt tag, so the image carries no text alternative.
  • Nothing checks that your image, app ID or player URL is reachable or the right size.
  • Fields for a card type you are not using stay hidden, and switching types does not clear values you cannot see.

Questions people ask

Why is my Player card showing a plain link?

Check that the player URL, width and height are all filled and that the card type is Player; a missing value leaves a warning under the selector and omits that tag.

Should I also add Open Graph tags?

Yes, X falls back to them, and keeping both in sync avoids missing previews.

Open Graph Generator, Meta Tag Generator and OG Preview complete the social markup around a Twitter card.