Developer

Twitter Card Generator

Generate Twitter/X card tags and preview social metadata quickly.

Loading interactive tool…

Embed this tool on your site

About this tool

Twitter Card Generator on UtilityKit builds the set of meta tags Twitter and X read to display a rich card when your link is shared. Paste your page URL, write a title and description, add an image URL and optional site or creator handle, pick between the compact summary card and the larger summary_large_image card, and the tool writes all seven twitter: meta tags as you type, ready to paste into your HTML head. Every tag is always included, even when its field is empty, so delete any empty lines you don't need. A basic preview box shows your image, URL, title, description and handles together so you can check the wording before publishing; it uses the same layout for both card types, so it is not an exact replica of X's rendering. summary suits blog posts and utility pages, while summary_large_image suits visual content, product launches, and editorial articles. Values are HTML-escaped, so quotes, ampersands and angle brackets in titles or descriptions never break markup.

Why use it

  • Instant Rich Cards: Properly tagged pages render with a title, description, and image instead of a plain URL when shared on Twitter or X.

  • Basic Live Preview: A preview box shows the image, URL, title, description and handles together as you type, so you can spot a broken image URL or an awkward title before deploying.

  • Both Card Types Covered: Switch between summary and summary_large_image with a single dropdown, and the twitter:card tag updates immediately.

  • Safe HTML Escaping: Title and description values are automatically HTML-escaped, preventing broken markup when content contains quotes, ampersands, or angle brackets.

  • Fixed Seven-Tag Block: Every output contains card, title, description, image, site, creator and url in the same order, which makes it easy to diff against a template.

  • Zero Setup: No API credentials, no sign-in, no Node.js toolchain. Open the tool in any browser, fill the form, copy the output — takes under one minute from start to pasted tags.

How to use

  1. Select the card type: choose summary for a compact card with a small square thumbnail, or summary_large_image for a wide-banner hero image that dominates the feed.
  2. Paste the canonical page URL into the Page URL field — this becomes the twitter:url tag and determines which URL Twitter resolves in its Card Validator.
  3. Enter a title up to 70 characters. Twitter truncates longer titles in the card display, so keep it concise and front-load the most important keyword.
  4. Write a description up to 200 characters that explains the page's value and entices a click. This maps to the twitter:description tag.
  5. Paste the full image URL. For summary_large_image, Twitter recommends at least 1200×628 pixels and a 2:1 aspect ratio in JPG or PNG format.
  6. Optionally add your site Twitter handle (e.g. @utilitykit) and a creator handle if attributing authorship, then click Generate to produce all seven tags.

When it helps

  • When launching a new page or blog post and you want it to render a rich card the first time someone shares it on Twitter or X.
  • When auditing an existing site and discovering that shared links show no image or a generic card — use this tool to generate correct replacement tags quickly.
  • When a designer hands off a new OG image and you need to update twitter:image without touching the rest of the page metadata.
  • When managing multiple client sites and needing a fast way to produce consistent, validator-ready Twitter meta tags for each one.
  • When building a static site generator or CMS template and you want a reference implementation of the correct seven-tag set to copy from.
  • When A/B testing card copy — quickly generate two tag sets with different titles or descriptions and compare engagement in Twitter Analytics after deployment.

Examples

Blog post with summary_large_image card

Input
Card: summary_large_image | URL: https://example.com/blog/api-guide | Title: The Complete REST API Design Guide | Description: Learn REST conventions, status codes, and auth patterns with real examples. | Image: https://example.com/og/api-guide.jpg | Site: @exampledev
Expected result
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="The Complete REST API Design Guide">
<meta name="twitter:description" content="Learn REST conventions, status codes, and auth patterns with real examples.">
<meta name="twitter:image" content="https://example.com/og/api-guide.jpg">
<meta name="twitter:site" content="@exampledev">
<meta name="twitter:creator" content="">
<meta name="twitter:url" content="https://example.com/blog/api-guide">

Tool page with compact summary card

Input
Card: summary | URL: https://utilitykit.tools/json-formatter | Title: JSON Formatter & Validator — UtilityKit | Description: Format, validate, and minify JSON in your browser. No upload, instant results. | Site: @utilitykittools
Expected result
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="JSON Formatter &amp; Validator — UtilityKit">
<meta name="twitter:description" content="Format, validate, and minify JSON in your browser. No upload, instant results.">
<meta name="twitter:image" content="">
<meta name="twitter:site" content="@utilitykittools">
<meta name="twitter:creator" content="">
<meta name="twitter:url" content="https://utilitykit.tools/json-formatter">

Product launch card with creator attribution

Input
Card: summary_large_image | URL: https://store.example.com/product/pro-kit | Title: Pro Utility Kit — Now Available | Description: The 12-in-1 compact toolkit for field engineers. Ships in 2 days. | Image: https://store.example.com/og/pro-kit.jpg | Site: @examplestore | Creator: @janesmith
Expected result
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Pro Utility Kit — Now Available">
<meta name="twitter:description" content="The 12-in-1 compact toolkit for field engineers. Ships in 2 days.">
<meta name="twitter:image" content="https://store.example.com/og/pro-kit.jpg">
<meta name="twitter:site" content="@examplestore">
<meta name="twitter:creator" content="@janesmith">
<meta name="twitter:url" content="https://store.example.com/product/pro-kit">

Tips

  • After deploying new tags, share the URL in a private post or draft to check that the card renders as expected — X's Card Validator no longer shows a visual preview.
  • Use summary_large_image for landing pages and blog posts where visuals drive engagement — it can increase click-through rate by 2-3x compared to a plain URL in the feed.
  • Keep your twitter:title distinct from your page H1 if needed. The card title is ad copy meant to earn a click; the page H1 is for SEO and reading flow.
  • Host images on HTTPS with a stable URL and no authentication. Twitter's crawler cannot follow redirects to S3 signed URLs or CDN URLs that expire.
  • Set twitter:image to the same 1200×628 pixel image you use for og:image to maintain consistency across all social platforms with a single asset.

Frequently Asked Questions

What is the difference between summary and summary_large_image?
A summary card displays a small square thumbnail (144×144 pixels) alongside the title and description on the left. A summary_large_image card shows a full-width banner image above the title and description. Use summary for text-heavy content like documentation or tools; use summary_large_image for visual content, product pages, and editorial articles where the image is the main draw.
Do Twitter Cards replace Open Graph tags?
No — they complement each other. Twitter reads its own twitter: tags first. If they are missing, Twitter falls back to Open Graph og: tags. Best practice is to include both sets. Use the UtilityKit OG Tag Generator alongside this tool to produce the full set in one session.
What image dimensions should I use for summary_large_image?
Twitter recommends a minimum of 300×157 pixels and a maximum of 4096×4096 pixels, with a 2:1 aspect ratio and under 5 MB. In practice, 1200×628 pixels at roughly 150 KB is the standard used by most publishers and matches the Open Graph spec as well.
Why does Twitter show a different card than the one I generated?
X/Twitter caches card metadata after it first crawls a URL. After updating your tags, the card usually refreshes on its own within about a week; sharing the URL with a harmless query string (for example ?v=2) makes X fetch it as a new URL. The old Card Validator no longer shows a visual preview.
Does twitter:url need to exactly match the canonical URL?
Yes — it should match the canonical URL you declared in the canonical link tag. A mismatch can confuse Twitter's crawler and cause the card to resolve to an unexpected page. Run both this tool and the UtilityKit Canonical Tag Generator together to keep the values consistent.
Are twitter:site and twitter:creator required?
No, both are optional. twitter:site is the @handle of the website or brand account and enables the 'by @handle' attribution line in the card. twitter:creator credits the individual author of the specific page. Omitting them still produces a valid, renderable card.
How long can the title and description be?
Twitter truncates titles beyond roughly 70 characters and descriptions beyond roughly 200 characters in card display, though the spec does not enforce hard limits. Keep titles under 70 characters and descriptions under 150 characters to avoid ellipsis truncation in most display contexts.
Can I use this tool for X (formerly Twitter) as well?
Yes. X continues to use the same twitter: meta tag namespace inherited from Twitter. The tag names, card types, and validation rules are identical. This tool generates output that works on both the legacy Twitter infrastructure and X's current card rendering pipeline.

Explore the category

Glossary

Twitter Card
A rich media attachment that renders below a tweet when a URL with valid twitter: meta tags is shared. Card types include summary, summary_large_image, app, and player.
twitter:card meta tag
The mandatory meta tag that declares the card type. Valid values are summary, summary_large_image, app, and player. Without this tag, Twitter renders only a plain link.
summary_large_image
A Twitter card type that displays a full-width banner image above the title and description, providing maximum visual impact for editorial and marketing content in the feed.
twitter:site
An optional meta tag containing the Twitter @handle of the website or brand account. Displays as an attribution line in the rendered card.
twitter:creator
An optional meta tag crediting the Twitter @handle of the individual author for the specific page content, separate from the site-level attribution.
Card Validator
Twitter's developer tool at cards-dev.twitter.com/validator. It once rendered a card preview; since 2022 it only shows log messages about the crawled tags, so most people now test by sharing the link.
A LITTLE HELP. A LOT DONE.
Good tools.
Great flow.

Your shortcut to the everyday. Create, convert, calculate,
and get back to what you love.

✓ Free to use✓ No sign-up✓ 500+ possibilities