Twitter (X) Card Generator
Generate Twitter Card tags for a summary, large image, player or app card, with the Open Graph fallbacks X reads when a tag is missing.
<!-- Twitter (X) Card. Put these inside <head>. -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="How to migrate a WordPress site without downtime">
<meta name="twitter:description" content="A step by step checklist, from the staging copy to the DNS cutover.">
<meta name="twitter:image" content="https://example.com/img/migration.png">
<meta name="twitter:image:alt" content="A migration checklist on a laptop screen">
<!-- Open Graph. X falls back to these, and every other network reads only these. -->
<meta property="og:title" content="How to migrate a WordPress site without downtime">
<meta property="og:description" content="A step by step checklist, from the staging copy to the DNS cutover.">
<meta property="og:image" content="https://example.com/img/migration.png">
Output is valid and updates as you type.
Fix the highlighted fields to update the output.
Generate the Twitter Card tags for a link, including the Open Graph fallbacks that X reads when a twitter: tag is missing and that every other network reads instead.
How to use
- Pick the card type.
summary_large_imageis the one people mean;summaryis the small square thumbnail. - Check the image size. A large image card needs at least 300 by 157, and 1200 by 630 is the size that renders everywhere without cropping badly.
- Fill in the alt text. X reads it to screen readers, and it takes up to 420 characters.
- Keep the Open Graph fallbacks. LinkedIn, Slack, Discord and WhatsApp read only those, so a page with Twitter tags alone previews as a bare link everywhere else.
- Validate by posting the link in a draft post, or with a card validator. The preview is cached after the first fetch.
Example
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="How to migrate a WordPress site without downtime">
<meta name="twitter:image" content="https://example.com/img/migration.png">
<meta name="twitter:image:alt" content="A migration checklist on a laptop screen">
<meta property="og:title" content="How to migrate a WordPress site without downtime">
The duplication is deliberate. X prefers the twitter: tags and falls back to Open Graph; nothing else reads twitter: at all.
Pitfalls
summary_large_imagewith an image under 300 by 157 silently renders as a small card. There is no error anywhere.- The image must be reachable without a login. A staging site behind basic auth previews as nothing.
- Previews are cached hard. Fixing the tags does not fix an already-cached preview without a re-fetch.
- Player cards require HTTPS, an iframe that runs no scripts beyond the player, and approval for some accounts. They are much fussier than they look.
twitter:siteandtwitter:creatorare handles, not URLs. A profile URL there is ignored.- Relative image URLs resolve to nothing for a crawler. Always absolute.
- Tags added by JavaScript are not seen. The crawler reads the HTML as served.
- Duplicate tags, usually one set from the theme and one from an SEO plugin, give unpredictable results.
Compatibility
Twitter Cards are read by X, and the twitter: prefix is still honoured after the rename. Open Graph is read by X as a fallback and by LinkedIn, Slack, Discord, WhatsApp and most chat clients. twitter:image:alt is supported for accessibility. App cards work on the X mobile apps and degrade to a summary card on desktop. The tool runs entirely in your browser.
Frequently asked questions
Do I need both Twitter and Open Graph tags?
twitter: tags only add the card type and the handles; everything else falls back.Why is my card small?
summary.