🖨️

HTML to PDF

Render HTML and produce a PDF through your browser print dialog with high fidelity, paper, orientation and margins adjustable
Local 📂 File 👤 ToolWorld 🏷️ v1.3.0
HTML code Paste or upload HTML, rendered live on the right
Drop an .html file here, or click to choose

The PDF comes from your browser print dialog, which keeps the layout best; choose Save as PDF there

Page preview

Paste HTML and click Render preview

How to Use

📖 About this tool


You have written an HTML report, an instructions page or a print template and want it as a PDF to send to someone, which usually means installing a plugin or buying a tool. This tool renders the HTML so you can see it, lets you set paper size, orientation and margins, and then hands the page to your browser print function to produce the PDF. Fidelity is higher than any conversion library can manage, and there is nothing to install.

It suits turning an exported HTML report into an archivable PDF, sending a client a neatly laid out set of instructions, or preparing web content as paper material. All rendering happens on your own machine.

Because the browser itself does the printing, fonts, colours and page breaks match the preview exactly instead of being approximated. The preview runs in a sandboxed frame, which means scripts inside your HTML are deliberately not executed; static structure and styling render fine, and that is what a printable document needs anyway. External images or fonts hosted on other domains may fail to load due to cross-origin restrictions, so inline or local assets are more reliable.

The preview runs in a sandboxed frame, so scripts inside your HTML are deliberately not executed. Static structure and styling render fine, and that is what a printable document needs in any case. Because your browser performs the printing, fonts, colours and page breaks match the preview exactly instead of being approximated by a conversion library, which matters for documents with tables, coloured callouts or precise spacing. Inline or local images and fonts are more dependable than assets pulled from another domain, which cross-origin rules may block.

✨ Features

  • Live rendering: paste or upload HTML and see the real result on the right.
  • Browser-printed PDF: best possible fidelity, with fonts, colours and breaks matching the preview.
  • Paper and orientation: A4 or Letter, portrait or landscape.
  • Four margin presets: none, narrow, default and wide, to control the white space.
  • Print options: keep background colours, print link addresses, and show a title on every page.
  • Content statistics: code length, element count, and how many images and tables there are.
  • Take the source with you: download the HTML or copy the code at any point.

🚀 How to use

  1. Paste HTML into the box on the left, or click Upload HTML to choose a file.
  2. Click Render preview to see the real page on the right.
  3. Choose the paper size, orientation and margins.
  4. Tick the print options you want: background colours, link addresses and a header title.
  5. Click Make PDF, then choose Save as PDF in the browser print dialog.
  6. To keep the source, click Download HTML or Copy code.

⚠️ Notes

  • PDF goes through browser printingThis gives the best fidelity but you must pick Save as PDF in the dialog, which mobile devices may not offer.
  • External assets may failImages and fonts hosted on other domains can be blocked by cross-origin rules.
  • Scripts do not runThe preview is sandboxed and deliberately does not execute JavaScript; only static structure and styles render.
  • Page breaks are the browser's callFor long documents, control important breaks with CSS page break properties.
  • Local onlyYour HTML never leaves the browser and the page does not keep it.

Related

⏫︎
💬