Twitter Card Generator

Generate X (Twitter) card tags with a live preview of the card.

  • Runs in your browser
  • Free, no sign-up
Preview
Image

In the timeline, X currently shows large image cards as the image with the domain, and the title over the image. The layout changes from time to time.

    About the Twitter Card Generator

    The X Card Generator writes the twitter: meta tags that turn a plain link on X (formerly Twitter) into a card with an image, a title and a description. Pick a card type, fill in the fields, and copy the tags into the <head> of your page.

    It supports all four card types: Summary, with a small square image; Summary with large image, the wide card most articles and product pages use; App, which points to an app in the App Store or Google Play; and Player, for embedded video or audio. A live preview and a checklist help you catch a missing image, a plain http player or an invalid account name.

    The limits come from X's card documentation: titles up to 70 characters, descriptions up to 200, alt text up to 420, and images under 5 MB. The tags themselves are built in your browser and never sent anywhere.

    How to use it

    1. Choose a card typeLarge image for most pages, Summary for a compact card, App to promote an app, Player for embedded media.
    2. Write the title and descriptionKeep the title under 70 characters and the description under 200. The counters show where you are.
    3. Add the image and alt textUse a full https:// address. The alt text describes the image for people using screen readers.
    4. Add accountsEnter the site's X account and the author's, with or without the @. The tool adds the @ for you.
    5. Copy the tagsFill in the app IDs or player URL if you chose those types, then copy the HTML or download twitter-card.html.

    Key features

    Four card types

    summary, summary_large_image, app and player, each with only the fields it needs.

    Card preview

    A large or compact preview with your image, title, description and domain, so you can judge the crop and the text.

    Image guidance per card

    Large image cards use a 2:1 image of at least 300 × 157 pixels; summary cards show a square of at least 144 × 144. Both must be under 5 MB.

    Account checks

    Warns when a handle has more than 15 characters or anything other than letters, numbers and underscores.

    App and player fields

    App Store IDs for iPhone and iPad, a Google Play package name and store country, or an HTTPS player URL with its width and height.

    Private by design

    Nothing is uploaded. The tool builds the tags on your device.

    Examples

    A large image card

    The sample article with an image, alt text "A cortado on a marble counter", site account "clayandco" and author "@sam_rivers" gives:

    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:site" content="@clayandco">
    <meta name="twitter:creator" content="@sam_rivers">
    <meta name="twitter:title" content="The 12 best coffee shops in Lisbon">
    <meta name="twitter:description" content="From tiny espresso bars to
      roasteries with a view, our local guide to the city's coffee.">
    <meta name="twitter:image" content="https://example.com/lisbon.jpg">
    <meta name="twitter:image:alt" content="A cortado on a marble counter">

    (The description is one line in the real output.) The title is 34 characters and the description 88, both well inside X's limits. The @ was added to "clayandco" automatically.

    Choosing a card type

    CardImageGood for
    SummarySquare, at least 144 × 144Home pages, profiles, short links
    Large image2:1, at least 300 × 157Articles, products, events
    AppFrom the app store listingPromoting a mobile app
    PlayerShown before playbackVideo or audio you host

    1200 × 600 pixels is a safe size for a large image card. Keep important text away from the edges, because X can crop the image slightly on some screens.

    What the checks catch

    You enterThe tool says
    Large image card, no imageThis card type needs an image.
    Player URL starting with http://The player URL must use HTTPS.
    App card without app IDsAdd at least one app ID.
    Author "@this_name_is_far_too_long"Account names have up to 15 letters, numbers or underscores.

    Tips

    • If your page already has Open Graph tags, you only need twitter:card. X falls back to og:title, og:description and og:image when the twitter: versions are missing.
    • Use twitter:creator for the author of an article and twitter:site for the publication. Both can be set at once.
    • Use JPG, PNG, WEBP or GIF. SVG images are not supported, and an animated GIF shows only its first frame.
    • Test the card by posting the link from a private test account or by starting a post and looking at the preview before you publish.
    • For the same preview on Facebook, LinkedIn and chat apps, add Open Graph tags with the Open Graph Generator.

    Common mistakes and limits

    • Leaving out twitter:cardWithout it, X has no card type to use, even if the Open Graph tags are perfect. It is the one tag every card needs.
    • Using a relative image pathtwitter:image needs a full URL, such as https://example.com/lisbon.jpg. A path like /lisbon.jpg will not load.
    • Blocking X's crawlerX fetches your page and image with its own crawler. A robots.txt rule, a login wall or hotlink protection can leave the card empty.
    • Expecting old posts to updateX caches cards. A post keeps the preview it had when it was shared; new posts pick up your changes after the cache refreshes.
    • Serving a player over httpPlayer cards must use HTTPS for the player page and everything it loads, or X will not show them.

    Frequently asked questions

    What are X (Twitter) cards?
    Meta tags that tell X how to show a link: as a card with an image, title and description instead of a bare URL.
    Which card type should I use?
    Summary with large image for most articles and products, because the wide image stands out. Summary for a smaller, square image. App and Player only for those uses.
    What image size works best?
    For large image cards, a 2:1 image such as 1200 × 600 pixels. For summary cards, a square image of at least 144 × 144. Keep files under 5 MB.
    How long can the title and description be?
    X's card documentation allows up to 70 characters for the title and 200 for the description. The tool counts both as you type.
    Do I need twitter: tags if I already have Open Graph?
    You need twitter:card. For the title, description and image, X uses the Open Graph versions when the twitter: ones are missing.
    Is it still called a Twitter card?
    The service is now X, but the tags still start with twitter:, and they keep working as they always have.
    Why does my card not show up?
    Check that the image URL is public and absolute, that robots.txt does not block X's crawler, and that twitter:card is present. Then post a new link, since old posts keep their cached preview.
    Is my data stored?
    No. The tags are generated in your browser, and nothing is saved or sent.