PDF tool

HTML to PDF

Convert HTML to PDF: paste code or open an HTML file and save it as a PDF with your paper size, orientation and margins. Remote files are never fetched.

Your file never leaves your device.

Simple steps

How it works

  1. 01

    Paste HTML or choose a local .html file, then select page size and orientation.

  2. 02

    Set the page margins and convert; scripts and remote resources are excluded.

  3. 03

    Download the resulting PDF created in your browser.

How the page is built

Your HTML is cleaned first: scripts, external stylesheets, frames and remote images are removed, so only inline styles and embedded data images remain. It is then laid out in a hidden frame as wide as the printable area and drawn as a picture.

On A4 with 10 mm margins, the printable area is 190 × 277 mm, which the page lays out at 718 CSS pixels wide; each PDF page then holds the next 1,047 pixels of height, so a long page continues over as many PDF pages as it needs.

Getting a good result

Design the HTML for the printable width: fixed widths larger than about 700 pixels are cut off at the right edge. Use inline styles or a style element, and embed small images as data URLs, because remote files are not loaded.

Because pages are pictures, the PDF text cannot be selected or searched, and a line of text can be cut where one page ends and the next begins. For a selectable document from plain text, use Text to PDF.

Good to know

Frequently asked questions

Can I convert a website by entering its URL?

No. This tool does not fetch web pages or external resources. Browser CORS and privacy restrictions prevent remote URL rendering.

Can the HTML load remote images or stylesheets?

No. Scripts, external stylesheets, frames, and remote image URLs are removed. Inline styles and embedded data images may render.

Which paper sizes are available?

Choose A4, Letter, or Legal, portrait or landscape, and margins from 0 to 40 mm.

Does conversion upload my HTML?

No. HTML is sanitized and rendered in a local sandboxed frame. The generated page images are passed to a browser worker to create the PDF.

Will the PDF text be selectable?

The current renderer captures the visual page output as images, so its text is not selectable or searchable in the resulting PDF.