Menu

Open Graph Preview

Author Open Graph and Twitter Card tags with a live social preview.

Last updated

Author mode — fill in the form, see previews, copy the tags.
Meta tag fields

Recommended 1200×630, under 8 MB, absolute URL (https).

Live preview
Coddy — Learn to code by doing
CODDY.TECH

Learn to code by doing — Coddy

Free interactive coding lessons in Python, JavaScript, and more. Practice in the browser, earn certificates, and build real projects with Coddy.

Generated <head> tags
<title>Learn to code by doing — Coddy</title>
<meta name="description" content="Free interactive coding lessons in Python, JavaScript, and more. Practice in the browser, earn certificates, and build real projects with Coddy." />
<link rel="canonical" href="https://coddy.tech" />

<!-- Open Graph (Facebook, LinkedIn, Discord, Slack) -->
<meta property="og:title" content="Learn to code by doing — Coddy" />
<meta property="og:description" content="Free interactive coding lessons in Python, JavaScript, and more. Practice in the browser, earn certificates, and build real projects with Coddy." />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://coddy.tech" />
<meta property="og:image" content="https://storage.googleapis.com/coddy-15505.appspot.com/public/coddy-logo-trans.png" />
<meta property="og:image:alt" content="Coddy — Learn to code by doing" />
<meta property="og:site_name" content="Coddy" />
<meta property="og:locale" content="en_US" />

<!-- Twitter / X -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Learn to code by doing — Coddy" />
<meta name="twitter:description" content="Free interactive coding lessons in Python, JavaScript, and more. Practice in the browser, earn certificates, and build real projects with Coddy." />
<meta name="twitter:image" content="https://storage.googleapis.com/coddy-15505.appspot.com/public/coddy-logo-trans.png" />
<meta name="twitter:image:alt" content="Coddy — Learn to code by doing" />
<meta name="twitter:site" content="@coddy_tech" />

What is an Open Graph preview generator?

When you share a link in any modern app — a post, a DM, a Slack channel — the platform fetches the URL and pulls out a small chunk of metadata to render a *share card*: the title, a description, an image, and the site name. That metadata isn't pulled from the visible page; it comes from a specific set of <meta> tags in the <head>. The Open Graph protocol, originally invented by Facebook in 2010, defines most of them. X (formerly Twitter) adds a few extras with twitter: prefixes. LinkedIn, Discord, Slack, iMessage, WhatsApp, and Pinterest all read the same tags with small variations.

Getting these tags right is a one-time job per page, but it has outsized impact. A page with no Open Graph image looks broken when shared. A title that's too long gets cut off mid-word. The wrong og:image aspect ratio is letterboxed by every platform. This tool lets you tune those values with live previews, so you can see truncation and cropping problems *before* you ship the page.

Everything runs locally. The form state, the previews, and the generated HTML never leave your browser — paste in pre-launch URLs and unreleased copy without worrying about leaks.

What you'll learn while using it

  • Open Graph tags use the property attribute (<meta property="og:title">), while standard SEO and Twitter Card tags use name (<meta name="description">, <meta name="twitter:card">).
  • Title and description tags should be set in *three* places when shared traffic matters: standard SEO (title, meta description), Open Graph (og:title, og:description), and Twitter (twitter:title, twitter:description).
  • og:image should be 1200×630, served over HTTPS, and given an absolute URL — relative paths fail when other servers fetch the page.

How to author Open Graph tags step by step

  1. Write a short, sharp title

    Aim for 50-60 characters. Facebook truncates at ~95 characters and X at ~70. Lead with the value, not the brand — "How to deploy with Cloudflare Workers" beats "Coddy Blog · Deployment Guide".

  2. Write a one-sentence description

    Aim for 120-155 characters. Most platforms truncate around 200. Use full sentences — the description appears below the title in every card, and clipped fragments look unfinished.

  3. Set the canonical URL

    Use the absolute https:// URL of the page itself, not a tracking or redirect link. Open Graph crawlers follow og:url when deduplicating shares — a canonical URL keeps share counts and previews consistent.

  4. Provide an absolute image URL

    1200×630 is the sweet spot for summary_large_image cards on X and standard cards on Facebook and LinkedIn. PNG or JPEG, under ~5 MB. Always use an absolute URL — relative paths fail because the social crawler hits the URL from its own server.

  5. Copy the generated tags

    Paste the block from the **Generated <head> tags** panel into your page's <head>. After deploying, validate with each platform's debugger (Facebook Sharing Debugger, X Card Validator, LinkedIn Post Inspector) and force a recrawl if you change the image later.

Open Graph and Twitter Card tag reference

The tags below cover everything social platforms read today. Tags marked with property= belong to the Open Graph protocol; tags marked with name= are the standard SEO / Twitter Card variants. Reference specs: Open Graph, X Cards.

TagUsed byRecommendedNotes
og:titleFB, LinkedIn, Slack, Discord50-60 charsFalls back to <title> if absent — set it anyway.
og:descriptionFB, LinkedIn, Slack, Discord120-155 charsFalls back to meta description if absent.
og:imageEvery platform1200×630, < 5 MB, HTTPS, absolute URLMust be an absolute URL — relative paths fail.
og:image:altAccessibilityDescribe the imageUsed by screen readers and some platforms.
og:urlFB, LinkedInCanonical https:// URLUsed to deduplicate shares across query-string variants.
og:typeFB, LinkedInwebsite or articlearticle unlocks article:published_time, article:author.
og:site_nameFB, DiscordBrand nameShown as the small attribution above/below the card.
twitter:cardXsummary_large_imagesummary for a small square thumb, summary_large_image for the banner layout.
twitter:titleXSame as og:titleX falls back to og:title if absent — set both for safety.
twitter:descriptionXSame as og:descriptionFalls back to og:description if absent.
twitter:imageXSame as og:imageFalls back to og:image if absent.
twitter:siteX@yourbrandThe publisher's X handle — drives some analytics.

Open Graph patterns to try

Blog post (article)

Set **og:type** to article, add **Author** and **Published time** in the article-specific section, and use a 1200×630 cover image. The previews update to show how the card looks on each platform.

og:type=article unlocks the article-specific tags (article:published_time, article:author) that some platforms (Discord, LinkedIn) use to surface attribution. Twitter ignores them but doesn't complain.

Product or landing page

Keep **og:type** as website. Use the product name as the title, a one-sentence value prop as the description, and a hero or screenshot crop as the image.

Landing pages don't need article metadata. The single most-clicked element on a shared landing page card is usually the image, so invest in a clean 1200×630 visual.

Documentation page

Title: "Concept — Section · Docs". Description: one sentence explaining the concept. Image: a generic docs cover or a screenshot of the relevant UI.

Docs pages get shared in Slack channels and X threads. A consistent docs cover image makes them recognizable in a busy feed even before the title is read.

Common Open Graph mistakes

  • Using a relative og:image URL like /images/cover.png. Social crawlers hit your page from *their* servers — relative paths point at the social platform's own domain and 404. Always use an absolute https:// URL.
  • Forgetting twitter:card. Without it, X defaults to a minimal card with no image. Add twitter:card=summary_large_image to get the banner layout almost every brand actually wants.
  • Skipping the og:image:alt tag. It costs nothing, helps screen-reader users, and a few platforms surface it as alt text on the rendered card.

Open Graph Preview FAQ

What is Open Graph?
Open Graph is a protocol Facebook published in 2010 that lets a web page describe itself with a small set of <meta> tags — title, description, image, type, and so on. Every major social and chat platform reads it today, which is why it became the de facto standard for share-card metadata.
Twitter Cards vs Open Graph — do I need both?
Ship both. X (Twitter) falls back from its twitter: tags to the equivalent og: tags when the X-specific ones are missing, so you can technically get by with just Open Graph. But adding twitter:card, twitter:site, and twitter:creator gives you finer control over how the card renders on X.
What size should og:image be?
1200×630 pixels (a 1.91:1 ratio) is the safest size. Facebook, LinkedIn, and X all render this aspect well. Keep the file under ~5 MB and serve it over HTTPS at an absolute URL — relative paths fail when other servers fetch your page.
Why doesn't my preview update on Facebook?
Facebook caches share cards aggressively. After changing the meta tags, paste the URL into the Facebook Sharing Debugger and click *Scrape Again*. The same trick works for X with the Card Validator and for LinkedIn with the Post Inspector.
Does Google use Open Graph tags?
For ranking, no — Google's own crawler reads the page content and your <title> and meta description. Google does occasionally pick up og:image for image search and discover surfaces, but it is not a ranking signal.
Can I generate a different image per page automatically?
Yes — most frameworks support dynamic Open Graph images. Next.js has the OG Image Generation API, SvelteKit and Astro have similar patterns. Render the image at request time and cache it aggressively — social crawlers time out quickly.

Learn more

Other developer tools

Coddy programming languages illustration

Learn to code with Coddy

GET STARTED