Home › PDF Tools › HTML to PDF

HTML to PDF Converter

Turn HTML and CSS into a clean PDF with the page size and margins you want.

Open an .html file or paste code below
Preview

Scripts in your HTML are not run (for safety), so pages that build themselves with JavaScript may look empty. Pictures from other websites can only be included if those sites allow it; to convert a live web page, open it and press Ctrl+P → Save as PDF, or save it (Ctrl+S) and open the .html file here.

How to use HTML to PDF

  1. Paste HTML or open an .html file.
  2. Choose the page size, orientation and margins, and check the preview.
  3. Download the PDF, or print to PDF for selectable text.

Two ways to save

Download PDF draws the page exactly as your browser shows it, split into pages. Print / Save as PDF uses your browser's print engine: text stays selectable and pages break between lines.

Good to know

  • Scripts in the HTML don't run, for your safety.
  • Pictures and stylesheets from other websites are included only if those sites allow it; pictures inside the HTML (data: URLs) always work.
  • Use CSS @media print and page-break-before for print layouts.

Converting a live web page

Open the page in your browser and press Ctrl+P (or ⌘+P) and choose Save as PDF. Or save the page with Ctrl+S and open the .html file here.

Frequently asked questions

Is my HTML uploaded?

No, it is rendered in your browser.

Can I convert a URL?

Browsers don't allow one website to read another, so paste the HTML or save the page first.

Which page sizes are available?

A4, US Letter, US Legal and A5, portrait or landscape.

Why does my page look empty?

It probably builds its content with JavaScript, which isn't run. Save the page from your browser after it has loaded.

Related tools

More PDF Tools