HTML to PDF
Paste HTML or open an .html file, see it as a printed page, and save it as a PDF from the print window.
Runs in your browser. Files stay on this device.Built with DOMPurify (Apache-2.0)
How to use HTML to PDF
- 1Paste HTML into the box, or open an .html file.
- 2Pick the paper and margins. The preview shows the page as it will print.
- 3Press Print, then choose Save as PDF as the printer.
Questions
Why do I pick Save as PDF myself?
The browser's own print engine lays out the page, so text stays as real, selectable text and CSS works as it does on screen. Choosing Save as PDF in the print window writes the file.
Do scripts in my HTML run?
No. The HTML is cleaned with DOMPurify first, which removes scripts, event handlers and anything else that could run code. The tool lists what it removed.
Why are some images missing?
Images from other websites are blocked so the page cannot call out to them. Images written into the HTML as data: URLs show and print.
Is my HTML uploaded?
No. It is cleaned and printed in this browser tab.
Is it free?
Yes. No account, no watermark and no daily limit.
Related tools
- PDFAdd Page NumbersPut page numbers on a PDF, in the corner or centre you choose, with styles like “Page 3 of 12”.
- PDFCompress PDFMake a PDF smaller by recompressing its photos and tidying its structure. Text stays sharp and selectable.
- PDFImages to PDFTurn photos and scans into one PDF, one image per page, in the order you choose.
- PDFMerge PDFJoin several PDF files into one, in the order you choose.
- PDFOrganise PDF PagesReorder, delete and turn the pages of a PDF, then save it as a new file.
- PDFPDF to ImagesSave every page of a PDF, or the pages you pick, as PNG or JPG pictures.