HTML to WebP Converter

Draw an HTML file as a WebP picture, with no scripts run and nothing loaded.

or drop files here

HT

HTML Format

HyperText Markup Language

The standard markup language for web pages, maintained by the WHATWG as the HTML Living Standard. It describes the structure of a page with elements and attributes.

  • text-based markup
  • elements and attributes
  • styled with CSS
  • rendered by every browser
WE

WEBP Format

WebP image

An image format developed by Google, first released in 2010 and built on the VP8 video codec for lossy images. It also supports lossless compression, transparency and animation.

  • lossy and lossless compression
  • alpha transparency
  • animation
  • supported by current major browsers

How to convert HTML to WebP

Follow these steps to convert HTML to WEBP online.

    1

    Choose your HTML file, or several at once.

    2

    Wait while the converter turns each file into WEBP.

    3

    Download each new WEBP file. Your original file isn't changed.

Before converting HTML to WebP

  • The page is laid out 1280 px wide and the image is as tall as the page, up to 4096 px.
  • A taller page is cut at 4096 px, and the page tells you so.
  • Scripts, linked stylesheets, frames and outside images are not run or loaded; only data: images and fonts in the file are used.
  • The page has no WebP quality setting.

About HTML and WebP files

What is an HTML file?

Web pages and applications are written in HTML, a markup language. The WHATWG now keeps it as a Living Standard; its early revisions date from 1990 to 1995 and were worked on at CERN, then at the IETF. Elements and attributes mark up a page's structure, while stylesheets set its look and scripts add behavior. The media type is text/html. Links can point to separate resources, so a file need not hold every asset itself.

Programs that open HTML files

  • Mac, Linux and Windows: Visual Studio Code is an editor with HTML highlighting, completion and formatting, and Firefox renders local HTML documents; it opens a file with Ctrl+O, or Command+O on a Mac.

HTML and WebP compared

WebP is an image format from Google, first released in 2010, whose lossy mode builds on the VP8 video codec. It also supports lossless compression, transparency and animation. Every current major browser displays it. An HTML file stays editable and searchable, while a WebP is a fixed picture of how the page looked.

Here the file is parsed without running anything, then laid out 1280 px wide in an off-screen sandbox and drawn as an image. Scripts, links and frames are removed, and only data: images and fonts in the file are used. Height follows the page with a ceiling of 4096 px, and there is no quality setting.

Other ways to convert HTML to WebP

  • Playwright and Pillow: with a Playwright page showing your document, call page.screenshot(path="page.png", full_page=True), then Image.open("page.png").save("page.webp") in Pillow. Pillow picks the format from the extension.
  • Chrome DevTools and GIMP: in DevTools, open the Device Toolbar, choose More options, then Capture full size screenshot. Open the screenshot in GIMP, choose File > Export As, pick WebP, and tick Lossless if you want no quality loss.
  • Chrome DevTools and cwebp: take the same full size screenshot, then run cwebp screenshot.png -o page.webp. cwebp accepts PNG, JPEG, TIFF, WebP or raw Y'CbCr input.

Problems with HTML files

Missing linked files can leave an offline HTML document without its pictures or styling, and an incorrect character encoding can make its text render incorrectly. Content that a script would build is not drawn here, because nothing is run. Embed what the page needs inside the file before converting.

Frequently Asked Questions

Everything you need to know about our converter

How do I convert an HTML file to WebP?

Does it run my page's JavaScript?

Why are my images and styles missing?

How wide is the image?

What happens to a very long page?

Can I choose the WebP quality?

What about video and audio on the page?

Will it look exactly like Chrome or Firefox?