Open Graph Tag Generator
Generate Open Graph and Twitter Card tags, with the image dimensions each platform actually wants.
Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.
What the Open Graph Tag Generator does
Use this open graph tag generator to generate Open Graph and Twitter Card tags, with the image dimensions each platform actually wants. Paste your text in, pick the options you need, and copy the result straight back out. It is most often used for adding social preview tags to a new page. There are more free online tools on FreeToolStation.org.
How to use it
- Fill in the title, canonical URL and image URL — all absolute HTTPS.
- Write a description under about 200 characters.
- Copy both blocks into the head of your document.
- Re-scrape with Facebook's Sharing Debugger and LinkedIn's Post Inspector to clear the cache.
How it works
Open Graph was created by Facebook and is now read by almost every platform that renders a link preview — LinkedIn, WhatsApp, Slack, Discord, Signal, iMessage. Twitter Cards are a parallel system, and Twitter falls back to Open Graph where a card tag is missing, which means a complete set of OG tags covers most cases on its own.
The image is the part that matters most, because a link with a preview image gets substantially more engagement than a bare text link. 1200 by 630 pixels is the size that works across platforms: a 1.91:1 ratio that Facebook and LinkedIn render in full. Below 600 by 315 the preview degrades to a small thumbnail.
Different platforms crop differently, and WhatsApp in particular uses a nearly square crop, so anything important near the left or right edge of a wide image disappears. Keep text and logos within the central area.
Caching is the thing that wastes the most time. Facebook, LinkedIn and Twitter all cache the scraped preview, sometimes for days. After changing tags, re-scrape deliberately with Facebook's Sharing Debugger and LinkedIn's Post Inspector rather than waiting and wondering why the old image persists.
When to use it
- Adding social preview tags to a new page.
- Fixing a link that shares without an image.
- Setting up a CMS template for social previews.
- Checking which image dimensions to produce.
Common mistakes to avoid
- Using a relative path for og:image. It must be an absolute HTTPS URL.
- Putting important content near the image edges, which WhatsApp crops off.
- Changing the tags and not re-scraping, so the old preview persists for days.
Frequently asked questions
What size should an Open Graph image be?
1200 by 630 pixels, a 1.91:1 ratio. Below 600 by 315 the preview degrades to a small thumbnail.
Do I need Twitter Card tags as well as Open Graph?
Twitter falls back to Open Graph when card tags are missing, so OG alone mostly works. Adding twitter:card lets you choose the large-image layout explicitly.
Why has my link preview not updated?
Platform caching. Re-scrape deliberately with Facebook's Sharing Debugger and LinkedIn's Post Inspector — otherwise the old preview can persist for days.