HTML to PDF

Preview HTML and save it as a PDF with the paper size you need.

Runs in your browser
HTML
Nothing yetStays in your browser
Preview
Ready

Save as PDF opens your browser's print window: choose "Save as PDF" as the printer. It keeps the page exactly as styled, with selectable text in every language. Download PDF builds a plain PDF straight away, with headings, paragraphs, lists, tables and images but without CSS layout.

How to use the HTML to PDF

  1. Paste HTML into the left panel, or open a saved .html file.
  2. Check the live preview and choose paper size, orientation and margins.
  3. Press "Save as PDF" and pick "Save as PDF" as the printer in the window that opens.
  4. Or press "Download PDF" for a plain PDF built straight away.

About this tool

Invoices, receipts, email templates, reports exported from software and pages saved from a browser are often plain HTML files. This tool shows the HTML in a safe preview, with any scripts switched off, and lets you turn it into a PDF on the paper size you choose.

There are two ways to get the PDF. "Save as PDF" hands the page to your browser's own print engine, the same one that draws websites, so every CSS style, web font and language appears exactly as in the preview and the text stays selectable. "Download PDF" skips the print window and builds a plain PDF directly from the structure of the page: headings, paragraphs, lists, tables, links and embedded images, without the CSS layout. That suits simple documents and works the same on every device.

Tip: images linked from other websites cannot be fetched from inside the page, so embed them as data URLs or save the page with its images first. A web address cannot be converted here either, because fetching another site needs a server; open the page and use your browser's print to PDF instead.

This tool runs entirely in your browser. What you type or open is never sent to a server.

Frequently asked questions

Is my HTML sent to a server?

No. The preview, the print window and the direct PDF are all produced by your browser. Your code never leaves this page.

Do scripts in my HTML run?

No. The preview runs in a locked frame with JavaScript turned off, so pasted code cannot do anything harmful. Content added by scripts will not appear.

Which button should I use?

Use "Save as PDF" when the look matters, for styled invoices and designed pages. Use "Download PDF" for a quick, plain document or when the print window is awkward on your phone.

Can I convert a website by its URL?

Not here. Loading another website needs a server, and this tool works without one. Open the site in your browser and choose Print, then Save as PDF.

Why are background colours missing in the printed PDF?

Browsers skip backgrounds when printing unless asked. Keep "Print background colours" ticked, and also tick "Background graphics" in the print window if your browser shows that option.