DevTools Logo

Social Media Card Simulator

Social Media Card Simulator

Preview how a URL appears on Twitter / X, Discord, and Slack

Source URL

Backend fetches metadata when available; otherwise use manual mode.

Manual metadata

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

.env Secret Safety Linter

Validate .env syntax and spot likely leaked credentials or placeholder secrets.

.htaccess Generator

Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth

2D Fluid Dynamics & Particle Physics Sandbox

A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.

AI Function Calling Schema Generator

Generate function calling JSON schemas from TypeScript interfaces

Algorithm Arena & Data Structure Visualizer

Interactive arena for algorithms and data structures: eight sorting algorithms racing on one seeded input, six pathfinding algorithms walking generated mazes, and BST, AVL, Red-Black, B-tree, heap and trie operations replayed step by step with rotations highlighted. Every run shows the Big-O table and the phase-highlighted reference implementation in four languages, and compared values can be played as pitch (sonification) through the shared audio engine. Everything runs client-side; inputs never leave the browser.

Ansible Playbook Generator

Build an Ansible playbook — hosts, vars, and tasks with modules — as YAML