Open Graph Generator
Builds Open Graph and X (Twitter) Card meta tags from a page title, URL, description, and image. Article, book, profile, product, video, and music types add their own properties, such as article:published_time or og:video with its size and duration. Values are HTML-escaped, and a notice names any of the four required properties (og:title, og:type, og:image, og:url) still missing.
This tool sends nothing over the network. Everything you enter is processed on your device and never reaches our servers.
Documentation
An Open Graph generator writes the meta tags that social networks and messaging apps read when a link is shared. The Open Graph protocol, published at ogp.me, names four required properties: og:title, og:type, og:image, and og:url. A page without them leaves each platform to guess a title and pick an image from the page, which often surfaces a site logo or an unrelated image. X (formerly Twitter) reads its own twitter: tags first and falls back to og:title, og:description, and og:image when the matching twitter: tag is absent; twitter:card itself has no Open Graph equivalent.
The type decides which extra vocabulary applies. website is the general default. article adds published_time, author, section, and tag; book adds author, isbn, release_date, and tag; profile adds first_name, last_name, and username. The video.movie, video.episode, video.tv_show, and video.other types point og:video at a playable file with its MIME type, pixel size, duration in whole seconds, and release date, while the music types point og:audio at an audio file, with a duration for music.song and a release date for music.album. product is not part of the core protocol: price, currency, brand, availability, and condition are the catalog tags Meta commerce reads. og:url should be the canonical address of the page, since platforms treat it as the permanent identity that likes and shares attach to, and both og:url and og:image need absolute https addresses.
Each value becomes a meta element: Open Graph and the type namespaces use the property attribute, and the X tags use name, as their specification does. Quotation marks, ampersands, and angle brackets are escaped, and line breaks inside a value collapse to single spaces so every tag stays on one line. A comma-separated tag list becomes one article:tag or book:tag element per entry, because the protocol expresses arrays by repeating the property. A locale typed as en-GB is rewritten to en_GB, the language_TERRITORY form the protocol specifies, and an X username gains its leading @ if it was left off. Settings holds the locale, a Meta App ID, and a one-line output mode.
The share preview under the code is a plain-text approximation, not a platform render. Platforms also cache what they scrape: after tags change, the Meta Sharing Debugger and the LinkedIn Post Inspector fetch the page again, and until then the old card keeps appearing. Meta recommends an image of at least 1200 x 630 pixels at a 1.91:1 ratio, accepts nothing under 200 x 200, and caps the file at 8 MB.
An article titled Fresh Sourdough Guide at https://example.com/sourdough, with the image https://example.com/loaf.jpg, the tags "bread, baking", the default en_US locale, and a summary_large_image card produces 10 elements: og:type, og:title, og:url, og:image, og:locale, 2 article:tag entries (bread and baking), then twitter:card, twitter:title, and twitter:image. The required-property notice stays empty because all four required properties are present.
Social platforms parse Open Graph and X Card tags to render rich link previews, and a preview with the intended title, description, and image draws more clicks than a bare address. Correct metadata replaces whatever the platform would otherwise auto-detect from the page.
- Blog publishing: The article type carries author, publication date, section, and tags, so Facebook and LinkedIn can show an article card with attribution for each post.
- E-commerce product pages: The product type adds price, currency, brand, availability, and condition, the catalog tags Meta reads when it builds product listings from a page.
- Portfolio and personal branding: The profile type adds first name, last name, and username, so a personal page shares as a profile rather than a generic website.
- Book promotion: The book type adds ISBN, author, and release date. Reading communities and aggregators that parse Open Graph tags can index the structured metadata.
- Marketing campaigns: A campaign-specific image and description copied into each landing page variant keeps every share on brand, and the image dimensions let platforms reserve the right space before the image loads.
- Multi-language sites: Each page can declare its own locale, such as fr_FR for French content or pt_BR for Brazilian Portuguese, so platforms label the language correctly.
- Social media audits: The generated set is a checklist against a live page: missing image dimensions, absent alt text, a relative image address, or the wrong og:type all show up when the two are compared.
- Video and music pages: The video and music types write og:video or og:audio with the file type, size, and duration. Whether a platform plays the file inline is the platform's decision; many show a standard card with the image instead.
- CMS migration: A baseline set of tags for each page, written before a site rebuild, can be pasted into the new templates so existing share previews survive the launch.
Inputs, outputs, and what the Open Graph Generator computes
What the Open Graph Generator asks for and what it returns, as a plain list. Defaults, units, and ranges are the ones the form loads with.
Inputs
- Type · default: website
- Title (text input)
- URL (text input)
- Description
- Image URL (text input)
- Image Alt Text (text input)
- Image Width (px) (numeric input) · minimum: 0
- Image Height (px) (numeric input) · minimum: 0
- Site Name (text input)
- Card Type · default: summary_large_image
- Twitter @username (Site) (text input)
- Twitter @username (Creator) (text input)
- Author (text input)
- Published Time (date input)
- Section (text input)
- Tag (text input)
- Price (text input)
- Currency (text input) · default: USD
- Brand (text input)
- Availability · default: Not specified
- Condition · default: Not specified
- First Name (text input)
- Last Name (text input)
- Username (text input)
- ISBN (text input)
- Release Date (date input)
- Media File URL (text input)
- Media MIME Type (text input)
- Video Width (px) (numeric input) · minimum: 1
- Video Height (px) (numeric input) · minimum: 1
- Duration (seconds) (numeric input) · minimum: 1
- Locale (text input) · default: en_US
- Include Facebook App ID · default: off
- Facebook App ID (text input)
- Minify output (all tags on one line) · default: off
Controls
Generate · Reset · Copy to Clipboard