PDFkind

Convert HTML to PDF

Paste HTML or open a saved web page and get a paginated PDF laid out with its own CSS, like printing it from a browser.

  • Files never leave your device
  • Free, no signup, no watermark
  • Works on any browser

How to convert HTML to PDF

  1. 1Paste HTML code or open an .html file
  2. 2Pick the page size, orientation and margins
  3. 3Convert and download the PDF
HTML to PDF: an example file and the PDF it produced
A real example: the file on the left, converted by this tool into the PDF on the right.

About HTML to PDF

Turn HTML into a tidy, paginated PDF laid out by your browser with its own CSS: flexbox and grid layouts, colors, gradients, borders and rounded corners carry over, print styles are applied, and long tables repeat their header on every page. Embedded images and inline SVG are kept, links stay clickable and text stays selectable. Handy for e-mail templates, invoices, generated reports and saved pages.

See also: EPUB to PDF

Useful for

  • Save an e-mail template or newsletter as PDF
  • Turn a generated invoice or report into PDF
  • Archive a saved web page
  • Print documentation with its styles

Frequently asked questions

Can I convert a live web page by its address?+

Not directly, because browsers block reading other sites. Save the page as HTML (Ctrl+S or Cmd+S) and open the file here, or paste its source code.

Is my CSS kept?+

Yes. The page is laid out by your browser with its own CSS, so flexbox, grids, colors, backgrounds, gradients, borders and rounded corners look as they do on screen, and @media print styles are applied as when printing. Box shadows are not drawn and scripts are not run.

How are page breaks handled?+

CSS page-break and break-before rules are followed, lines of text and pictures are never cut in half, and a long table continues on the next pages with its header row repeated.

Which images are included?+

Embedded images, inline SVG and pictures from websites that allow it. An image that does not answer within a few seconds is skipped, so the conversion never hangs.

Are links and text kept?+

Yes. Text stays selectable and searchable, and web links stay clickable in the PDF.

Is my HTML uploaded to a server?+

No. The page is laid out and converted in your browser, so your code never leaves your device.

Add HTML to PDF to your website

Free, no ads, no sign-up. Paste one line of code and your visitors use it right on your pages.

<div data-pdfkind-tool="html-to-pdf"></div>
Get the code

You might also need

See all 128 PDF tools