Skip to content

HTML to PNG

Turn a saved web page, an email or any HTML file into one PNG picture of the whole page.

Needs our servers

Drop HTML files here

Needs our servers. You confirm before anything is uploaded.

Deleted 60 minutes after you download it.

Window width

Keep a receipt, a newsletter, a chart or a whole web page as one picture to drop into a slide, a chat or a bug report. FormatJet opens the HTML file in Chrome on our servers with the network closed, so nothing on the page loads from the web unless you allow it, takes a picture of the whole page and deletes the upload as soon as the picture is ready.

About the formats

HTMLHTML web page

HTML is the markup language of web pages: text with tags for headings, links, lists, tables and images. A saved web page is an HTML file.

PNGPNG image

PNG is a lossless image format with transparency. It’s ideal for screenshots, logos and graphics with sharp edges, but photos come out larger than JPG.

Converted with Web page to image (Browser Run).

Questions

How wide is the picture, and how much of the page does it show?

The page is laid out in a window 1280 pixels wide, about a laptop screen, unless you choose a phone, tablet or desktop width. The picture shows the whole page from top to bottom, one image pixel for each pixel of the page’s layout.

What happens to a very long page?

The picture stops at 16,383 pixels tall, the most a WebP image can hold, and PNG and JPG stop at the same size, so the bottom of a very long page is cut off. A page wider than that is cut at the same size. To keep all of a long page, convert it with HTML to PDF instead, which splits it into printed pages. A long page full of photos in a wide window can make a PNG too large to send back, while a JPG or WebP of it stays far smaller.

Why does my saved page come out without its pictures or styles?

A page saved as “HTML only” keeps just its text and tags, and even a complete save keeps its pictures and styles in a folder beside the file. Only the HTML file is uploaded, so those files are missing from the picture. FormatJet warns you before uploading when a page points to files saved next to it. Pictures embedded in the file itself are kept.

Do scripts on the page run?

Yes, in a browser on our servers, so charts and tables that a script draws are in the picture. Scripts get a few seconds to finish, and a page that never stops changing is taken as it stands at that moment. They can’t reach the internet unless you turn on loading from the web.

What does “Load images, styles and fonts from the web” do?

It lets the page fetch the pictures, styles and fonts it links to on other websites, over HTTPS only, as an email does when you show its images. It’s off by default, so tracking pixels and analytics in a saved page or email never load. Files saved beside the page still can’t load, because only the page is uploaded.

HTML to PNG with the API

Convert from your code with one request. See the HTML to PNG API

curl "https://api.formatjet.com/v1/convert?conversion=html-to-png" \
  -H "Authorization: Bearer $FORMATJET_API_KEY" \
  -F file=@input.html \
  -o output.png