Skip to content
brownie.tools

Open Graph Tag Generator

Import head HTML, resolve metadata conflicts, and preview local images before copying sharing tags.

Import from HTML

Parsed locally with no uploads. Open Graph values take precedence over Twitter values.

0 characters · suggested length: 60

0 characters · suggested length: 160. Text is never truncated in the HTML.

Advanced metadata

Language and territory, for example en_US.

For example @username.

Local image and card preview

Choose a local preview image

Local image preview

example.com

Your page title

Your page description

Local files stay in your browser. Dimensions fill automatically. Enter a published image URL for the tags; remote images are not loaded. Keep key content within the dashed area; platform crops vary.

Runs locally in your browser. Nothing is uploaded or sent to a server.

Enter Title and Page URL to generate Open Graph and Twitter Card HTML, then copy the output into your page's head. Add an image URL, alt text, description, locale, and dimensions, or import existing head HTML to inspect duplicates and conflicts. Local JPEG, PNG, WebP, and GIF previews fill image dimensions automatically without loading remote images. Choose the card metadata explicitly; previews illustrate cropping rather than guarantee a published platform layout.

Updated

How do you generate Open Graph tags for a real page?

Enter Title and Page URL to get a copyable block of Open Graph and Twitter Card meta elements. Output updates automatically once validation passes; there is no separate generate button. For a concrete example, use the values below, leave Content type as Website and Twitter Card layout as Large image, and leave Site name, Locale, and Twitter site handle empty.

A complete image example with matching dimensions
FieldExample value
TitleField Notes & Maps
Page URLhttps://example.org/guides/maps/
DescriptionA practical guide to reading trail maps.
Image URLhttps://example.org/images/trail-map.png
Image alt textA trail map with a marked walking route.
Image width (px) / Image height (px)1200 / 630

Those inputs produce 13 meta elements. The title's ampersand becomes an HTML entity in both title attributes, preserving the text without breaking markup. The image description appears twice, once for each metadata family. The final two elements supply the image dimensions.

<meta property="og:title" content="Field Notes &amp; Maps" />
<meta property="og:url" content="https://example.org/guides/maps/" />
<meta property="og:type" content="website" />
<meta property="og:description" content="A practical guide to reading trail maps." />
<meta property="og:image" content="https://example.org/images/trail-map.png" />
<meta property="og:image:alt" content="A trail map with a marked walking route." />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Field Notes &amp; Maps" />
<meta name="twitter:description" content="A practical guide to reading trail maps." />
<meta name="twitter:image" content="https://example.org/images/trail-map.png" />
<meta name="twitter:image:alt" content="A trail map with a marked walking route." />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />

Copy the block into the initial head HTML of that specific page. The generator does not edit your website. The Open Graph protocol defines four basic properties: og:title, og:type, og:image, and og:url. This form permits a draft without an image, but reports the missing image as a publishing suggestion.

How can you import existing tags and resolve conflicts?

Open Import from HTML, paste the page's head markup, and select Import metadata. Parsing happens locally; pasted resource elements are not attached to the live page. The report identifies duplicate Open Graph and Twitter tags, distinguishes duplicates with conflicting values, and says that the first value was imported. It also flags relative og:url and og:image values, missing image width or height metadata, and differences between matching Open Graph and Twitter fields.

Open Graph values take precedence over their Twitter counterparts. The importer selects the first Open Graph image, falling back to the first Twitter image if no Open Graph image exists. It reads associated image details after that image and before the next image of the same family. Multiple image alternatives are not preserved in the generated output.

Import replaces the form when Open Graph or Twitter metadata is found; it does not merge only the populated fields into your draft. If neither family is found, the fields remain unchanged. Unsupported content or card types are reported for review, with the form retaining its defaults. Resolve the source conflict in your template as well as in this form, or the next deployment may recreate it.

How can you control card layout and image metadata?

Twitter Card layout explicitly selects summary_large_image or summary. It starts at Large image and does not infer the choice from whether Image URL is filled. The platform preview tabs control a separate illustration: Facebook / LinkedIn uses a 1.91:1 image area, and X large card uses 2:1. Selecting Summary thumbnail changes the exported value but does not turn this illustration into a thumbnail layout.

Under Advanced metadata, Content type offers Website, Article, and Product. These set og:type only; choosing Article does not add publication dates, and choosing Product does not add prices. Locale accepts a two-letter lowercase language, an underscore, and a two-letter uppercase territory, such as en_US. It does not translate the title or description. Twitter site handle accepts 1–15 letters, digits, or underscores, with an optional leading @; output includes exactly one leading @.

Supply both image dimensions as positive whole pixel values matching the published asset. Alt text exports to both og:image:alt and twitter:image:alt. Dimensions and alt text require an Image URL; without it, generation stops. For ordinary page titles, descriptions, and canonical markup beyond sharing cards, use the Meta Tag Generator.

How can you preview an image without loading its remote URL?

Choose a local JPEG, PNG, WebP, or GIF. Once decoded, its natural dimensions automatically replace Image width (px) and Image height (px). Selecting a file does not populate Image URL, publish the image, or embed its bytes in the HTML. If generation disappears after choosing a file, enter the published image URL to accompany those newly populated dimensions.

The image fills the preview area using a cover crop. Show crop-safe overlay starts enabled and draws a dashed rectangle inset by 10% on all sides. Keep essential content inside it as a composition aid, not a promise about every platform's crop. The tool warns below its recommended 1,200 × 630 size and when the ratio differs from 1.91:1 by more than 0.15. These are local checks, not remote image verification.

Use Remove preview image or choose another file to compare compositions. Temporary object URLs are released when the file is replaced, removed, or the component closes. Removing the preview does not clear the dimensions already filled into the form; review them if your published asset differs. Neither the page URL nor the image URL is fetched for inspection.

What should you check before publishing the generated tags?

A nonblank title and absolute HTTP or HTTPS page URL are required. Image URLs use the same scheme and credentials checks. Relative paths and URLs containing a username or password are rejected. Missing description, image, or image alt text produces suggestions, while malformed locales, handles, or incomplete dimension pairs stop output. Leading and trailing whitespace is trimmed from the main text fields before export.

Title and description suggestions use 60 and 160 characters as editing guidelines, not platform limits. Full text remains in the generated HTML even when the illustration visually clamps it. Use the Character Counter for separate copy editing and the SERP Snippet Preview for a search result illustration.

After deploying, inspect the initial HTML for duplicate tags and confirm that the page and image are publicly reachable. This tool cannot diagnose HTTP errors, redirects, crawler permissions, or stale platform caches, and cannot force a card refresh. Previously shared URLs may retain cached metadata. Review the deployed sharing result separately from this local composition preview.

How to Use Open Graph Tag Generator

  1. Title and Page URL

    Enter a nonblank title and an absolute HTTP or HTTPS page URL. Add Description, Image URL, Image alt text, and Site name as needed. Output updates automatically when the inputs are valid.

  2. Import from HTML

    To start from existing tags, open Import from HTML, paste into Paste the page's head HTML, and click Import metadata. Review the imported fields and reported conflicts. Skip this step when creating tags from scratch.

  3. Twitter Card layout and Advanced metadata

    Choose Large image or Summary thumbnail under Twitter Card layout. Open Advanced metadata for Content type, Locale, Image width (px), Image height (px), and Twitter site handle.

  4. Choose a local preview image

    Optionally select a JPEG, PNG, WebP, or GIF to populate dimensions and inspect cropping. Compare Facebook / LinkedIn and X large card with Show crop-safe overlay. Supply a published Image URL separately.

  5. Generated OG & Twitter Card Tags

    Resolve validation errors and review Before publishing suggestions. Copy Generated OG & Twitter Card Tags into the published page's initial head HTML, then verify the deployed page and image.

Frequently Asked Questions