Convert HTML to PDF
Convert HTML to PDF with selectable text. Paste your code or open an .html file, check it in a locked-down preview, then save it as a PDF using the PDF engine already built into your browser.
Preview
How to convert HTML to PDF
Add the HTML
Paste it into the editor or open a file.
Check the preview
Scripts are stripped out, so what you see is the static page.
Set up the page
Choose the paper size and margins.
Save as PDF
In the print dialog that opens, choose “Save as PDF” as the printer.
Why we do it this way
Any language
Your browser lays the page out with its own fonts, so Arabic or Japanese displays just as well as English, and the text stays selectable.
A safe preview
Scripts and forms are stripped out, along with embedded frames, and the preview runs in a sandbox that can’t contact other websites.
CSS works
Style blocks and inline styles are kept, including print rules such as page-break-before.
What it can’t do
We can’t fetch a live web page from its address. Browsers don’t let one website read another’s pages, and we don’t run a server to do it. If you want a PDF of a page you’re looking at, use your browser’s own File › Print › Save as PDF.
Images and stylesheets hosted on other sites are left out of the preview so it never contacts outside servers. Embed images as data URLs if you need them in the PDF. On an iPhone or iPad the print dialog doesn’t say “Save as PDF”: tap Share in the print preview, then Save to Files. And if all you have is plain text, Text to PDF makes the file directly.
Privacy and security
Your HTML is cleaned and shown in a sandboxed frame on your device. The PDF is created by your own browser, so neither the code nor the finished document passes through PDF365.
Read more in our privacy policy.
HTML to PDF FAQs
Can I convert a website by its URL?
No. Open the page in your browser and use Print › Save as PDF there instead.
Why are my images missing?
Images from other websites are blocked so the preview can’t contact outside servers. Use images embedded as data URLs, or add them afterwards with Add Image.
Does my JavaScript run?
No. Scripts are removed and the preview is sandboxed, so anything that relies on JavaScript won’t appear.
How do I get rid of the date and web address at the page edges?
In the print dialog, open More settings and untick “Headers and footers”.