# Meta Tag Generator

> Fill in a page's title, description and share image, see how it looks in search and as a share card, and copy clean meta and Open Graph tags.

- Page: https://codethatmoves.com/tools/dev/meta-tag-generator/
- Site: Code That Moves
- Category: Developer tools
- Free, runs in the browser, nothing is uploaded
- Last checked: 2026-11-03

## What it does

- Title, description, canonical, Open Graph and X (Twitter) card tags in one block
- Optional tags: charset and viewport, robots (noindex, nofollow, max-image-preview:large), og:locale, theme-color, author, og:image width, height and type, and article dates
- A separate share title and description for og: and twitter: tags when the card should say something else than the search result
- A Google result preview that cuts the title and description by measured pixel width, not characters
- Share card previews for Facebook, LinkedIn, X, Slack, Discord and WhatsApp, each with its image ratio and where the rule comes from
- Checks for length, absolute URLs, missing image, image alt text, image size and ratio, and noindex
- Preview a local image file in the cards and see its size, ratio and file size before you upload it
- Paste a page's HTML to read its current tags back into the form, with a report of missing required tags and duplicated tags
- Copy the tags or a share link that restores every field

## How to use it

1. Fill in the title, description, page URL and share image URL. Counters show the length as you type.
2. Look at the Google preview and its pixel widths, switch between the six share cards, and read the checks under the code. Load the image to see your picture in each card.
3. Copy the tags into the head of the page. To check a live page, open View Source, copy the HTML and paste it into the box at the bottom: the report lists what is missing or repeated.

## What it checks and why

Two sets of tags decide how a link looks outside your site. The title element and the meta description feed search results. Open Graph tags (og:title, og:type, og:image, og:url and others) feed the cards that Facebook, LinkedIn, Slack, Discord and messaging apps draw when someone shares the link. The Open Graph protocol lists title, type, image and url as the four required properties.

X reads its own twitter: tags first and falls back to the matching Open Graph tag when one is missing, so in most cases twitter:card plus your og: tags are enough. Turn on the repeat option if you want the twitter: tags written out anyway.

The Google preview measures your text in the browser with canvas measureText at 20 px Arial for the title and 14 px Arial for the description, then cuts it with an ellipsis. Google publishes no pixel limit: its docs only say title links are truncated as needed to fit the device width. The ~600 px title and ~920 px description budgets are common third-party rules of thumb, and Google can rewrite either text.

Image rules differ by app. Meta recommends 1200 by 630 pixels (about 1.91:1) for Facebook, LinkedIn asks for at least 1200 by 627 at 1.91:1, and X uses 2:1 for a large image card and 1:1 for a summary card. Slack documents that it reads Open Graph and X card tags but gives no image size. Discord and WhatsApp publish no rules, so their previews follow what the apps show today and are the roughest of the six.

## Specs and sources

- [The Open Graph protocol](https://ogp.me/)
- [X Developer Platform: Cards markup](https://developer.x.com/cards/markup)
- [Google Search Central: Influencing title links](https://developers.google.com/search/docs/appearance/title-link)
- [Google Search Central: Robots meta tag specifications](https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag)
- [Google Search Central: Control your snippets](https://developers.google.com/search/docs/appearance/snippet)
- [Meta for Developers: Images in link shares](https://developers.facebook.com/docs/sharing/webmasters/images)
- [LinkedIn Help: Share images and link previews](https://www.linkedin.com/help/linkedin/answer/a521928)
- [Slack: Unfurling links in messages](https://docs.slack.dev/messaging/unfurling-links-in-messages/)
- [MDN: CanvasRenderingContext2D.measureText()](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/measureText)

## Limits

- It cannot fetch a live URL: that would need a server. Paste the page's HTML instead.
- The previews show the shape of a result and a card, not each platform's exact styling, and platforms cache cards, so a changed tag can take time to show.
- Pixel widths depend on the fonts on your device; without Arial the browser measures a fallback font. Google's real cut-off is not published and changes with screen size.
- Discord and WhatsApp document nothing about link previews, so those two cards are the least certain.
- The share image preview loads the picture from its own server when you ask for it. Everything else stays on your device.

## Questions

### How do I stop a page from showing in Google?

Add a robots meta tag with noindex (tick noindex under More tags). The page must stay crawlable: if robots.txt blocks it, Google never sees the tag. Without a robots tag, indexing and following links is the default.

### Do meta keywords still matter?

Not for Google. Google said in 2009 that its web search ignores the keywords meta tag for ranking, so the generator does not write one.

### What meta tags does a page need?

A title, a meta description, a canonical link, and the Open Graph tags og:title, og:type, og:image and og:url, plus twitter:card for X. The generator writes all of them from one form.

### How long should a meta description be?

Google sets no fixed limit and trims snippets to fit the screen. A common guide is 150 to 160 characters, with the main point in the first sentence.

### What size should an Open Graph image be?

Facebook recommends 1200 by 630 pixels, close to a 1.91:1 ratio, and at least 600 by 315 for a large link preview; LinkedIn asks for at least 1200 by 627. One 1200 by 630 image works for both. X crops a large card to 2:1, so keep the subject away from the top and bottom edges. Use an absolute https URL.

### How many pixels can a Google title be?

Google does not say. Its docs state that title links are truncated to fit the device width. About 600 px at 20 px Arial on desktop is a widely used rule of thumb, and that is what the preview measures against.

### Do I need Twitter card tags if I have Open Graph?

You need twitter:card to choose the card type. For title, description and image, X falls back to the og: tags when the twitter: ones are missing.

### Why is my share preview not updating?

Platforms cache a link's tags the first time it is shared. Use the platform's own debugger, such as the Facebook Sharing Debugger or LinkedIn Post Inspector, to fetch the page again.
