Skip to content

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

Orientation
This opens your browser’s print dialog with the document ready to go. Choose Save as PDF (or “Microsoft Print to PDF” on Windows) as the printer, then save. Your browser’s own PDF engine creates the file, so text stays selectable and every language is supported.

How to convert HTML to PDF

  1. Add the HTML

    Paste it into the editor or open a file.

  2. Check the preview

    Scripts are stripped out, so what you see is the static page.

  3. Set up the page

    Choose the paper size and margins.

  4. 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?
Why are my images missing?
Does my JavaScript run?
How do I get rid of the date and web address at the page edges?

Browse all PDF tools