Skip to main content

Twitter Card Generator

API reference

Generate Twitter (X) Card meta tags for summary, large-image, app and player cards. Checks X's limits for titles, descriptions, alt text, handles, HTTPS player URLs and App Store ids as you type, and can add matching Open Graph tags. Copy or download the HTML.

Input

Up to 70 characters.

Up to 200 characters.

The X account of the website or app the card belongs to.

The X account of the content's author.

Absolute URL, under 5 MB, JPG/PNG/WEBP/GIF. Large image: 2:1, at least 300×157. Summary: 1:1, at least 144×144. Player: same size as the player.

Up to 420 characters.

Adds matching og: tags so Facebook, LinkedIn, Slack and Discord show the same preview.

Output

Meta Tags
 

Paste this inside the <head> of your page.

Checks
Was this helpful?

More ways to use this tool

REST API

curl -X POST https://api.iotools.cloud/v1/tool/twitter-card-generator \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "cardType": "summary_large_image",
    "title": "How to Brew Better Pour-Over Coffee",
    "description": "Grind size, water temperature & pour timing — th…",
    "site": "@examplecoffee",
    "creator": "jane_roasts",
    "image": "https://example.com/images/pour-over.jpg",
    "imageAlt": "Pour-over coffee dripping into a glass carafe",
    "includeOpenGraph": "true",
    "pageUrl": "https://example.com/blog/pour-over/"
  }'

Swap in your own key from your account. The tool's fields are the body — no wrapper.

Ask an AI agent

Use the IOTools `twitter-card-generator` tool (Twitter Card Generator) on this input:

YOUR_INPUT_HERE

Paste this at any agent connected to the IOTools MCP server, then add your input.

Embed widget

<iframe
  src="https://iotools.cloud/embed/twitter-card-generator/"
  width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
  title="Twitter Card Generator — iotools.cloud"
  sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
  allow="clipboard-write"
  style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>

Drop this into your own page — free, no key required, just a link back.

Cost per API/MCP callFrom 5 credits
Need more credits?View pricing

Also available with

Guides

Twitter Cards are the twitter:* meta tags that decide what a link to your page looks like when someone posts it on X: a headline, a short description, an image, and sometimes an inline video player or an app download button. This generator writes those tags for all four card types. It also checks them against X's own limits while you type, so you don't find out about a missing image after the post has gone out.

How to use it

  1. Pick a Card Type. For most pages that's Summary with large image.
  2. Fill in the title, description and image URL. Add your site's X handle and, if you like, the author's handle.
  3. For a Player card, add the HTTPS embed URL and its width and height. For an App card, add your App Store and/or Google Play ids.
  4. Read the Checks box, fix anything marked ⚠, then copy or download the tags and paste them into your page's <head>.

The four card types

  • Summary with large image (summary_large_image): a full-width image above the title. Use a 2:1 image, at least 300×157 (1200×600 is a safe size).
  • Summary (summary): a small square thumbnail next to the title. Use a 1:1 image, at least 144×144.
  • Player (player): plays video or audio inline from an iframe you host. The player URL must be HTTPS, and you still need a fallback image for clients that can't play it.
  • App (app): shows your app's name, icon and store rating with an install button. It needs at least one store id: the numeric App Store id, or the Google Play package name.

What the checks cover

Titles over 70 characters, descriptions over 200 and alt text over 420 are all flagged, since X cuts them off. The checks also catch handles that aren't valid X usernames, relative image URLs, player URLs that aren't HTTPS, missing player dimensions and badly formed store ids. Invalid values are left out of the output instead of being emitted broken, and every value is HTML-escaped.

Do I still need Open Graph tags?

X falls back to og:title, og:description and og:image when the matching twitter: tag is missing, but other platforms never read twitter: tags. Tick Also add Open Graph tags to get a matching og: block, so Facebook, LinkedIn, Slack and Discord show the same preview. For a fuller Open Graph setup, see the HTML Meta Tag Generator.

How do I check the result?

Once the tags are live, run your URL through the Open Graph & Twitter Card Preview to see how the card renders, or the Open Graph Checker to audit the tags a live page actually serves.

Privacy

Everything runs in your browser. Nothing you type is uploaded, and the tool never fetches your URLs.

twitter cardx cardtwitter meta tagstwitter:cardsummary_large_imageplayer cardapp cardsocial meta tags

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.