OG Image Generator

Create a social share image (title, subtitle, background) for Open Graph, X, LinkedIn or Pinterest, right in your browser. Free PNG, no upload.

🌐 Español

🔒 Private by design: your text is processed locally in your browser and never uploaded to any server.

The one size that works nearly everywhere

Every platform publishes its own preferred share-image dimensions, and reading those pages back to back makes the problem look harder than it is. In practice 1200 by 630 pixels is the size that behaves: Facebook, Slack, Discord, WhatsApp, iMessage and most link-unfurl bots read it as the og:image and render it without complaint, and X accepts the same file for a large summary card, trimming a sliver off the top and bottom to reach its own 16:9 shape.

That is why the four presets here are not equal in usefulness. Open Graph at 1200 by 630 is the default and the one to reach for. The X preset (1200 by 675) and the LinkedIn preset (1200 by 627) exist because those platforms document those exact numbers, and some people want the match to be exact; the practical difference from the default is a few dozen pixels of crop. Pinterest is the genuinely different one at 1000 by 1500, portrait rather than landscape, because a pin is a tall object in a masonry feed and a landscape card looks lost there.

If you are making one image, make the 1200 by 630. If you are making a set for a blog post that will also be pinned, make that one and a Pinterest version, and skip the other two.

Two lines in a box is the whole input

There is a single text area, and the convention is positional: line one is the title, everything after it becomes the subtitle, joined with spaces and with blank lines discarded. Titles cap at 200 characters and subtitles at 300, which is far past the point where either still reads well.

That design is a constraint made visible rather than a stylistic choice. This tool runs on a shared text-in, image-out shell used by several other pages on this site, and the option schema behind those dropdowns supports selects, numbers and checkboxes only, with no free-text field. Rather than fork a bespoke component (or modify a shell that other tools depend on, which is how you break three pages while shipping one), it borrows the same two-line convention our Wi-Fi QR code generator already established for the same constraint.

How a long title gets fitted

The interesting part of this tool is not the drawing, it is the type fitting, and it works like a human sizing a headline in a layout program: try big, and step down until it fits.

On a 1200 pixel wide canvas the search starts at 78 px, which is 6.5 percent of the width, and steps down 4 px at a time to a floor of 28 px. At each size the title is word-wrapped to the available width (984 px after 9 percent side margins) and accepted if it fits in three lines or fewer and inside a block-height budget of 62 percent of the vertical space. That second condition bites hardest on the short landscape canvases, where three lines at the maximum size come close to filling the whole budget; on the tall Pinterest canvas there is so much vertical room that the line count is what limits the size instead.

Concretely, a title of around forty characters clears the first size it tries and never enters the loop properly. Push it to ninety and the search settles several steps lower. Only when three lines at 28 px still overflow does the last line get truncated with an ellipsis, which is a deliberate last resort: a clipped word reads as a mistake, but text running off the edge of the canvas reads as a broken tool.

The subtitle is then sized as 42 percent of whatever the title landed on, clamped between 18 and 46 px, wrapped to at most two lines, and separated from the title by a gap of 35 percent of the title size. Title and subtitle are treated as one block and centred vertically together, so a card with no subtitle centres its title exactly rather than leaving a hole where the subtitle would have been.

Contrast you do not have to check yourself

Nothing here asks you to choose a text colour, because that is a question with a right answer. Each background’s colour stops are converted to a REC.601 luma value with the same function our image filters use, averaged, and compared against a threshold of 140: below it the text is white, above it a near-black navy. The white background is the only preset that trips the dark side of that test, which is exactly as intended.

The four gradients are two-stop diagonals running from the top-left corner to the bottom-right, which is exactly the case a single luma reading has to be honest about. Ocean, Purple and Forest keep both stops on the dark side of the threshold, so averaging them changes nothing. Sunset does not: its orange stop reads brighter than the cut-off while its pink stop reads darker, so the average is what decides, and the tool commits to one text colour for the whole canvas rather than switching colour halfway down a gradient.

The left-aligned template adds a vertical accent bar down the left edge, 14 px wide on a 1200 px canvas, drawn in the text colour at 85 percent opacity so it reads as an accent rather than a second element competing with the headline. The subtitle is likewise drawn at 88 percent opacity, which is enough to establish hierarchy without looking faded.

Generating it and pointing a page at it

  1. Type your title on the first line and an optional subtitle on the second.
  2. Choose a Platform size, a Layout template and a Background.
  3. Click the action button, which reads OG Image Generator, then check the preview, and download the PNG. It is named after the preset, for example og-image-og.png.
  4. Upload that file to wherever your site serves images, and put its full public URL in the page’s og:image meta tag.

Step four is the one people skip. A social platform’s crawler fetches the image itself, over HTTP, from a public URL, so the PNG in your downloads folder does nothing until it is hosted. Meta Tags Generator will produce the whole tag block once you have the URL, and if you are assembling a site’s launch assets in one sitting, Favicon Generator covers the other half of the job.

What it deliberately will not do

There is no image upload, no custom colour picker, no font choice and no logo slot. Some of that is the shell constraint described above; the rest is that a tool with fourteen controls and no design guardrails produces worse cards than a tool with three. If you need a photographic background or your own mark in the corner, generate the typographic card here and composite on top of it with Watermark Image. If the hero visual should be code rather than a headline, Code Screenshot is the better starting point.

One honest caveat about output stability: the text is drawn with a system font stack, so the same title generated on Windows, macOS and Linux will not be byte-identical, and in an edge case a slightly wider font can push a wrap point. That is the cost of drawing with fonts already on your machine rather than fetching a webfont, which would mean a network request and a dependency on someone else’s CDN staying up. Everything here is composed on a canvas in your tab, which is why a headline for a post you have not published yet never leaves the machine you drafted it on.

See it in action

Screenshot of the OG Image Generator tool with the sample input “Every tool runs in your browser”, Platform size set to Open Graph / Facebook / Slack (1200×630), Layout template set to Centered
OG Image Generator mid-process: the sample input “Every tool runs in your browser”, Platform size set to Open Graph / Facebook / Slack (1200×630), Layout template set to Centered.
Screenshot of the OG Image Generator result screen showing og-image-og.png ready to download (41 KB)
The finished result: og-image-og.png ready to download (41 KB). The download link is a local blob URL — the file never leaves your device.

Frequently asked questions

How do I add a subtitle when there is only one text box?

Put the title on the first line, press Enter, and type the subtitle on the second. Any further lines are joined together with spaces into that same subtitle, so pasting two short sentences works. The subtitle is optional; a single line gives you a title-only card, vertically centred on its own.

Which size preset should I actually pick?

Pick Open Graph (1200 by 630) unless you have a specific reason not to. It is the size Facebook, Slack, Discord, WhatsApp and iMessage read, and X accepts it directly and simply crops a little off the top and bottom. The X and LinkedIn presets exist for people who want a pixel-exact match to one platform's published spec, and Pinterest is portrait because pins are.

How long can my title be before it gets cut off?

The tool tries font sizes from 78 px downward in 4 px steps on a 1200 px wide canvas, wrapping to at most three lines, so most titles up to roughly 60 characters set cleanly on one or two lines. Longer titles keep fitting at smaller sizes; only when three lines at the 28 px floor still overflow does the last line get an ellipsis. Around 60 characters is the length that looks intentional rather than squeezed.

Can I use my own brand colour or a photo background?

Not in this tool. You get seven curated backgrounds, three solid and four two-stop diagonal gradients, and no upload field at all. To put your own photo or logo into the image, generate the PNG here and then layer on top of it with the Watermark Image tool, which does accept an uploaded image.

I generated the same image on a Mac and a Windows PC and they look slightly different. Why?

The text is drawn with a system font stack, so Windows renders it in Segoe UI while a Mac uses the system font and Linux falls back further down the list. Letter shapes and widths differ a little, which can change where a title wraps. Generate all of a site's cards on one machine if you want them to look like a set.

How do I actually make this my page's share image?

Upload the PNG wherever your site hosts its images, then set that public URL as the og:image (and twitter:image) value in the page head. The Meta Tags Generator writes that tag block for you. Link-preview bots fetch the image over HTTP, so a file sitting on your own computer will never appear in a preview.

Related tools