How the HTML is turned into an image
Browsers can draw HTML inside an SVG picture through the SVG <foreignObject> element, which holds content from another XML namespace, in practice XHTML. The converter first cleans your HTML and shows it in a sandboxed preview frame at the width you chose, where it measures the height of the content. It then copies that document into a <foreignObject> of the same size, lets the browser draw the SVG on a canvas at 1, 2 or 3 times the size, and saves the canvas as PNG or JPG. Because the browser's own layout engine does the work, flexbox, grid, gradients, rounded corners, shadows, tables and web-safe or system fonts come out as they look in the preview. A 1200 × 630 card at 2× becomes a 2400 × 1260 image with crisp text.
What it cannot do: web addresses, scripts and outside files
This tool does not take a website address. Capturing a live page from a URL means opening that page on a server, running its scripts and photographing the result, and we do not run a server that visits addresses for visitors. Copy the HTML you need instead, or for a page you can see, use your browser's own screenshot command. For the same safety reasons, pasted scripts and event handlers are removed and do not run, and frames, objects and external stylesheets are dropped. Images, fonts and stylesheets on other websites are not fetched: an SVG drawn as an image may not load outside resources, and the preview frame blocks them as well, so the result matches the preview. Each blocked address is listed above the preview. Images and fonts you add from your device are placed inside the page as data URLs, which are allowed.
Width, height, scale and file size
The width is the layout width in CSS pixels, the same as the width of a browser window, so a page with media queries shows its mobile layout at 360 px and its desktop layout at 1280 px. With auto height the image is exactly as tall as the content; a fixed height crops or pads the bottom, which is what you want for a social card with a set size, such as 1200 × 630 or 1080 × 1080. The scale multiplies both sides: 2× has four times the pixels of 1×. Browsers limit the size of a canvas, so the converter keeps each side within 16,384 px and the total within 100 million pixels; if 3× would go past that it lowers the scale and tells you, and a page taller than 16,384 px is cut at that height. PNG keeps text sharp and allows a transparent background. JPG is smaller for photos and gradients but has no transparency, so a background colour is always filled.
Arabic and right-to-left layouts
Arabic letters are joined and shaped by the browser, so they look as they would on a web page. If your HTML has no dir attribute and most of its letters are Arabic, the converter sets the page to right to left; you can also choose left to right or right to left yourself. Use CSS logical properties such as margin-inline-start and text-align: start so one design works in both directions. Fonts are the ones installed on your device unless you add a font file. That means an Arabic design may look slightly different on another computer with other fonts, so for a brand font add the .woff2 or .ttf file and name it in @font-face with url(yourfont.woff2). Numbers inside Arabic text keep their order, and mixed Arabic and English lines follow the normal bidirectional rules of the browser.
Ideas for using HTML as an image
Designers and developers use HTML to make images that are easier to edit as code than in a drawing program: link preview cards for articles, quote cards, a price list for a shop window or WhatsApp, certificate headers, charts made with CSS, and screenshots of a component for documentation. For a share image, set the width to 1200 and the fixed height to 630, then check the tags that point to it with our meta tag generator. Vector graphics already saved as SVG files are better converted with SVG to PNG. To shrink the result before you upload it, use compress image; to change its size later, use resize image. More image tools are on the image tools page.