Free tool

HTML to PDF, with your CSS kept.

Paste HTML or open an .html file, such as an email template, an invoice, a report or a page you saved, and save it as a PDF. Your own browser draws it, so styles, web fonts and colours come out the way they look on screen, and the text stays selectable. Choose the paper size and margins, and drop in the pictures that go with the file.

HTML
Preview at paper width

A print window opens. Choose "Save as PDF" as the destination, then Save.

Paper

Only for HTML you trust. Scripts are off so that code from elsewhere cannot run on this page.

The HTML is shown and printed by your browser. It is never uploaded.

Tips

For a PDF that looks right.

01 / Pictures

Full addresses load

Pictures with full web addresses load as usual. For pictures saved next to the file, drop them in with it.

02 / Breaks

New page where you want

Add style="break-before: page" to any element to start a new page there.

03 / Print styles

@media print

Rules inside @media print in your CSS apply to the PDF only, for example to hide a menu or buttons.

Questions

Good to know.

Can I convert a website address to PDF?

Not here. Web pages on other sites cannot be read from this page without a server in between, and this tool has none. Open the site in your browser and use File, Print, Save as PDF, or save the page as HTML and drop it here.

Why is the background missing in my PDF?

Browsers leave out backgrounds when printing unless told otherwise. "Keep background colours and pictures" tells them to keep them; if they are still missing, tick "Background graphics" under More settings in the print window.

Is the text in the PDF selectable?

Yes. The browser writes the text as text with its fonts, the same as printing any web page to PDF.

The print window does not open.

Some browsers block printing from inside a frame or a pop-up blocker steps in. Allow pop-ups for this site, or save the HTML as a file, open it in a browser tab and print it from there.

Can I turn Markdown into PDF?

Yes, use Markdown to PDF, which makes the PDF directly without a print window.