OGP & Meta Tag Validator

Paste your HTML to validate Open Graph (OGP) and Twitter Card meta tags. Detects missing tags and bad og:image URLs, and previews the social share card.

Inspecting the meta tags that decide how a link looks when shared

The title, description and image that appear when a link is posted to a social network are decided by the Open Graph and Twitter Card meta tags written in the page's <head>. This tool extracts them from the HTML you paste in, points out missing tags and faulty values, and previews the result in something close to the card as it will actually appear.

The commonest fault by far is writing og:image as a relative path. The crawlers fetch the image from their own servers, so a path such as /img/ogp.png cannot be resolved and the card arrives with the image missing. Always write it as an absolute URL beginning with https://. The other thing worth knowing is that these services cache what they crawl. Correcting a tag may leave the old content on display, and you then have to prompt a refetch through each service's debugging tool. Note also that a Twitter Card falls back to the og: tags where no twitter: tag exists, so there is no need to write both.

How to use it

  1. Paste in the HTML source The contents of <head> alone will do, or the whole page if that is easier.
  2. Try the samples first A good example and a bad one are provided, so you can see how the judgements differ before you start.
  3. Read the points raised Missing tags and any og:image that is not an absolute URL are called out.
  4. Check the appearance in the preview You can see how the title wraps and where the description is cut before you post anything.

Tips for getting more out of it

  • The recommended og:image size is 1200×630px (a 1.91:1 aspect ratio). Images that are too small or the wrong aspect ratio may be cropped unexpectedly by social platforms.
  • Crawlers used by Facebook, LINE, and Slack read og:title/og:description. X (Twitter) cards also fall back to the matching og: tags when twitter:title, twitter:description, or twitter:image is missing, so once the og: tags are in place you do not need to duplicate them as twitter: tags. Add twitter: tags only when you want X to show something different.
  • twitter:card has no og: counterpart; it specifies the card type (summary, summary_large_image, and so on). X's official guide starts by specifying the card type, so it is best to set it explicitly.
  • Set og:url to the canonical, absolute (https://) URL of the page. This also helps avoid duplicate-content confusion caused by URLs with tracking parameters.
  • Right after changing your meta tags, social platforms may still show a cached, outdated preview. Use each platform's re-scrape tool (e.g. Facebook's Sharing Debugger) to refresh the cache.

Where it comes in useful

Checking an article before publication

If a link looks broken once it is out, caching means correcting it does not put things right. Looking first is the surer course.

Verifying what a template produces

Paste the <head> your CMS or framework emitted and confirm that the intended tags are there.

Reviewing a change of image

Whether a new og:image is an absolute URL is exactly the sort of thing that goes unnoticed.

Taking a lead from other sites

Paste the source of a page that displays well and see which tags it takes the trouble to set.

Open Graph terms

Og:title
The heading shown on the card. It can differ from <title>, which lets you word it more briefly for social media.
Og:description
The descriptive text on the card. It is cut off if too long, so put the substance first.
Og:image
The image on the card. Always give it as an absolute URL. Around 1200 by 630 pixels is a convenient size.
Og:type
The kind of page. article is usual for a piece of writing and website for anything else.
Twitter:card
The shape of the card. Setting summary_large_image displays the image at full width.
Og:url
The canonical URL of the page. It is where shares are consolidated, so take care not to write a URL carrying query parameters.

Frequently Asked Questions

The most common cause is a relative image URL (like /img/a.png). Most crawlers cannot resolve relative URLs, so always use an absolute URL starting with https://. It can also fail to show if your server blocks the crawler's User-Agent, or if the image is too small.

Yes, they serve different purposes, so setting both is recommended. <title> is used for the search results title and the browser tab, while og:title is used for the card title when the page is shared on social media. Many crawlers fall back to <title> if og:title is missing, but the result may not match what you intended.

For a typical article or blog page, summary_large_image is recommended, since it displays a large image. If a small thumbnail is enough, use summary instead. app and player are meant for app-install prompts and embedded video/audio respectively, and are not typical choices for a regular web page.

Social platforms cache the results of their crawl, so an outdated preview can persist even after you fix the tags. You need to explicitly request a re-crawl using each platform's tool — for example Facebook/LINE's Sharing Debugger, or X's Card Validator — to refresh the cache.

Most crawlers will fall back to <title> and meta description to build a preview, but no image will be shown, resulting in a plain link-and-text preview. Since this affects click-through rates, it's best to set at least og:title, og:description, and og:image.
Tool-kun

Side Note — Why OGP exists — Facebook built it to make the "Like" button work

The Open Graph Protocol (OGP) was created by Facebook in 2010 to help popularize its "Like" button. At the time, sharing a web page on Facebook produced little more than a bare link and title, and click-through rates suffered. Facebook's solution was to let a page itself declare how it should look when shared, by adding a new <meta property="og:xxx"> namespace to plain HTML.

Interestingly, OGP is built on top of RDFa, a W3C specification for embedding structured data in HTML. By reusing an existing standard, Facebook was able to ship the new feature without needing cooperation from browser vendors or other companies — just a handful of extra meta tags on top of existing pages. That "extend without breaking backward compatibility" approach worked, and OGP became a de facto standard adopted well beyond Facebook, on platforms like Slack, LINE, and Discord.

Twitter never adopted OGP outright; instead it created its own separate namespace, Twitter Cards (twitter:xxx). This was arguably as much a competitive choice as a technical one — not wanting to simply adopt a spec that originated with rival Facebook. However, Twitter's parser was built to read the matching og: tag whenever a twitter: tag is missing, so only a few tags, such as twitter:card, actually need to be written separately. Even so, which tag falls back to which is not obvious, and that is one reason tools like this validator remain useful.