DevTools Logo

Social Media Card Simulator

Social Media Card Simulator

Preview how a page appears on X, Facebook, LinkedIn, Discord, and Slack.

Try an example

Page HTML

Optional. Never fetched in this mode; used only to resolve relative image URLs.

Previews

Paste page HTML to preview the cards

Nothing leaves your browser.

Details

Uses the /v1/social-preview backend endpoint when available, with a deterministic manual mode fallback. Metadata is displayed client-side and is not stored.

Examples

OG plus Twitter extraction

Input
extractSocialMeta('<title>Site</title><meta property="og:title" content="OG"><meta name="twitter:card" content="summary">')
Output
{ title: "Site", ogTitle: "OG", twitterCard: "summary" }

Title, Open Graph, and Twitter fields extract into one meta object.

Platform field split

Input
buildPlatformPreviews(socialMetaFromInput({ ogTitle: "OG", twitterTitle: "Tweet", twitterCard: "summary" }))
Output
[{ twitter: "Tweet"/summary }, { discord: "OG"/embed }, { slack: "OG"/link unfurl }]

X uses Twitter fields while Discord and Slack prefer OG fields.

About this tool

Social Media Card Simulator previews link cards with extractSocialMeta(html) and buildPlatformPreviews(meta): meta tags and the title parse through regex without DOM APIs, and socialMetaFromInput fills any missing field with empty strings.

Extraction covers title from the title element, description from meta name description, ogTitle, ogDescription, and ogImage from property attributes with HTML entities decoded, twitterTitle and twitterCard from name attributes, and image mirroring ogImage.

Platform conventions differ: X prefers twitterTitle and twitterCard with summary_large_image and twitter/og/fallback source tracking, while Discord and Slack prefer OG fields with embed and link unfurl card types.

How to use this tool

  1. Paste page HTML

    Provide the head markup holding title and meta tags.

  2. Check extracted meta

    Verify title, description, image, OG, and Twitter fields decoded correctly.

  3. Compare platforms

    Read the Twitter, Discord, and Slack previews with their card types.

Use cases

Previewing link shares

See how a URL renders on X, Discord, and Slack before publishing.

Debugging missing images

Confirm og:image is present since image mirrors that field.

Checking card types

Verify twitter:card values propagate to the X preview with fallbacks.

Common mistakes

Mistake:Expecting image from a bare img tag.

Fix:Image mirrors og:image only — add the meta tag instead of relying on page images.

Mistake:Reading Discord titles from twitter:title.

Fix:Discord and Slack prefer OG fields, so set og:title for those previews.

Mistake:Assuming unclosed tags throw.

Fix:Unmatched markup parses to empty strings — validate head HTML when fields go missing.

Frequently asked questions

What does this tool do?

It extracts title, description, Open Graph, and Twitter meta tags with extractSocialMeta, then renders Twitter, Discord, and Slack previews with buildPlatformPreviews.

How do platform previews differ?

X prefers twitterTitle and twitterCard with a summary_large_image fallback, while Discord and Slack prefer OG fields with embed and link unfurl types plus twitter/og/fallback source tracking.

Is my HTML uploaded or stored?

No. Regex parsing, entity decoding, and preview mapping run entirely in your browser.

Why empty fields or a fallback source?

Image mirrors og:image so bare img tags never fill it, Discord and Slack ignore twitter:title, and unclosed markup parses to empty strings rather than throwing.

References & standards