HTML to PDF

Turn a saved web page or HTML file into a paged PDF, in A4 or Letter.

  • Free
  • No sign-up
  • No watermark
  • Files stay on your device
This tool runs entirely in your browser. Your files are not uploaded, stored or seen by anyone, including us. Check it yourself

Open your browser's developer tools (F12), go to the Network tab and run the tool: no request carries your file.

Scripts in the HTML file are not run, and images or styles from other websites may not load. Save the page as a complete HTML file first.

Guide

How to convert an HTML file to PDF

  1. Drop a saved .html or .htm file onto the drop zone above, or click it to pick one.
  2. Choose the Page size (A4 or Letter) and the Orientation (Portrait or Landscape). Landscape suits wide tables and pages with a sidebar.
  3. Set the Margin (mm) around the content. The default is 10 mm; use 0 for edge-to-edge pages.
  4. Click Convert to PDF. The page is laid out and split into as many PDF pages as it needs.
  5. Download the PDF.

The HTML file is opened and converted inside your browser, so it is never uploaded to a server. That matters for saved invoices, bank pages or internal reports.

How the conversion works

The tool lays out your HTML file in the browser, captures the result like a screenshot of the whole page, and cuts that tall picture into pages of the size you chose. Two things follow from that, and it is better to know them before you start:

  • The text in the PDF is not selectable. Each page holds the content as an image, so you cannot search or copy it, and links do not work. Run OCR PDF afterwards if you need searchable text.
  • Scripts in the file are not run. Content that a page builds with JavaScript, such as charts, comment sections or "load more" lists, will be missing.

Images and stylesheets that the file loads from other websites may also fail to load, because browsers limit what one page can fetch from another site. The page then shows up without its pictures or with plain styling. Files that contain their styles and images inside the HTML itself convert best. If you are saving a web page, save it as a complete web page first (in Chrome or Edge: Ctrl+S, then "Webpage, Complete").

A good alternative: your browser's Print to PDF

If you want selectable text and working links and the page is open in your browser, every major browser can save it as a PDF directly:

  1. Open the page and press Ctrl+P (Cmd+P on a Mac).
  2. Set the destination or printer to Save as PDF (Firefox calls it "Save to PDF").
  3. Adjust the paper size and margins, then save.
HTML to PDF (this tool)Browser Print → Save as PDF
InputA saved .html or .htm fileA page open in the browser
Text selectableNo (pages are images)Yes
Looks likeThe screen layoutThe page's print layout, which may hide menus and ads
ScriptsNot runAlready run, so dynamic content is included

Use this tool when you have an HTML file rather than a live page, for example an exported report, an email saved as HTML or a file produced by another program, or when you want the on-screen look rather than the print style.

Limits

  • Very long pages make very tall images, which can be slow or run out of memory on phones. Split the content into several files if that happens.
  • Elements may be cut across a page break, because the page is sliced like a picture rather than reflowed like a document.
  • Fonts that the file loads from the web may be replaced with a similar font on your device.
Tip: Converting a Word document instead? Word to PDF handles .docx files. To join several converted pages into one file, use Merge PDF. Curious why we process files in the browser? See how online PDF tools handle your files.

Frequently asked questions

How do I convert an HTML file to PDF?

Drop the .html file here, choose A4 or Letter, the orientation and the margin, then click Convert to PDF. The file is converted in your browser and never uploaded.

Why can't I select text in the PDF?

The tool captures the page as images, which keeps the on-screen look but not the text. For selectable text, open the page in your browser and use Print → Save as PDF.

Why are images or styles missing?

They are loaded from other websites, and those requests may be blocked or fail. Save the page as a complete web page first, or use a file that has its images and styles built in.

Can I convert a website URL to PDF here?

No. The tool only works with HTML files on your device; it does not fetch web pages. Open the site in your browser and save it with Print → Save as PDF, or save it as an HTML file and convert that.

Is JavaScript in my HTML file run?

No. Scripts are not run, for your safety. Content that only appears after a script runs will not be in the PDF.

Updated

Comments

Share a tip, ask a question or tell others how the tool worked for you.
Copied to clipboard