curlytab

curlytab / HTML to PDF

From browser to paper.

HTML to PDF Converter

Open an .html file or paste HTML code, preview it, and save it as a PDF. Your browser's own print engine does the conversion, so text stays sharp and selectable and the layout matches what you see. Nothing is uploaded.

Clicking Save as PDF opens your browser's print window. Set the destination (printer) to Save as PDF, turn on Background graphics to keep colors, and save.

How to use the HTML to PDF Converter

  1. Click Open .html file or paste your HTML into the box.
  2. Choose the page size, orientation and margins, and check the Preview.
  3. Click Save as PDF. Your browser's print window opens.
  4. Set the destination to Save as PDF and click Save.

How it works

Browsers already contain an excellent PDF engine: it's what Print → Save as PDF uses. This tool shows your HTML in a safe preview, adds your page size and margins, and hands it to that engine. The result has real, selectable text and vector graphics, not a blurry screenshot.

Tips

  • Images and styles: files linked with relative paths, like img/logo.png, can't be found. Use full https:// links, or embed small images as data URIs.
  • Scripts don't run in the preview, for safety. Pages that build their content with JavaScript won't show it.
  • Page breaks: add style="break-before: page" to an element to start it on a new page.

Frequently asked questions

Can I convert a web page URL?

Not directly. Open the page in your browser and use Print → Save as PDF, or save the page as HTML and open the file here.

Why doesn't the PDF download automatically?

The browser's print window does the conversion, so you choose Save as PDF there. That gives the sharpest result.

Is my HTML uploaded?

No. Everything happens in your browser.

Add this HTML to PDF converter to your website

Free for blogs, schools and businesses. Copy the code below and paste it into your page's HTML. The tool works exactly like this one and runs in your visitors' browsers, so nothing is uploaded. Please keep the credit line so others can find it too.

Preview embed ↗