Skip to content
HTML to Image & Video
Sizes and use cases

HTML to OG Image Generator

Design an Open Graph image in HTML and CSS, then download it at 1200 by 630.

px
Live preview

Checkerboard areas are transparent and stay transparent in the exported file.

What you get

A studio for HTML images

Images in three formats

Export PNG for sharp edges and transparency, JPEG for small files, or WebP for the best size to quality ratio. Scale up to 3x for retina screens and print.

Private by design

Rendering happens on your device. Your code and files are never uploaded.

Step by step

How to make an Open Graph image from HTML

  1. Edit the template title, site name and subtitle in the HTML box.
  2. Adjust colors and type in the CSS box. The stage is already 1200 by 630.
  3. Click Export PNG, or use the JPEG converter for a smaller file.
  4. Upload the image and point your og:image tag at its absolute URL.

What makes a good Open Graph image

The common size is 1200 by 630 pixels, a 1.91 to 1 ratio. Keep important text near the center, because some platforms crop the edges. Use large type, since the image is often shown small in a feed.

Add it to your page

Set the og:image meta tag to the absolute URL of the file and add twitter:card with the value summary_large_image. Then check the result with each platform sharing debugger, because they cache previews.

Keep exploring

Learn more

Guides and tutorials

Answers

Frequently asked questions

What size is an OG image?

1200 by 630 pixels is the widely used size. It works across most social networks and chat apps.

Should an OG image be PNG or JPEG?

Both work. JPEG is smaller for photos and gradients, and PNG is better for flat colors and sharp text.

Can I make one image per blog post?

Yes. Keep the HTML as a template, change the title for each post, and export. Each export takes a few seconds.

Is my code uploaded to a server?

No. The conversion runs entirely in your browser using the Canvas, Web Animations and MediaRecorder APIs. Your HTML, CSS and images never leave your device.

Ready to convert your HTML?

Free, private and runs in your browser.

Start converting