HTML to PDF

HTML to PDF is a free online tool that turns an HTML page into a PDF on our server, with no scripts run and nothing fetched from the web.

Turn an HTML page into a PDF, from a file or from HTML you paste, in A4 or Letter with the margins you choose. No scripts run and nothing is fetched from the web. This tool runs on our server; your page is deleted automatically right after your download.

Also searched as: convert html to pdf · web page to pdf · html file to pdf · html code to pdf

Loading the tool…

How to use it

  1. 1

    Add your page

    Choose or drop an HTML file, or paste the HTML.

  2. 2

    Choose the page

    Pick A4 or Letter and the margin.

  3. 3

    Download

    Save the PDF; your page is then deleted.

Questions about HTML to PDF

Why are my pictures and styles missing?

For safety the server does not fetch anything from the web, so pictures, style sheets and fonts that live at other addresses are left out. Put the styles in a style tag and embed pictures in the page as data: addresses, then convert.

Does JavaScript run?

No. The page is drawn as it is written, so content that only appears after a script runs will not be in the PDF.

What happens to my page?

It is deleted automatically as soon as your download is ready, and within 1 hour at most.

Can I convert a web address?

No. The server never fetches web addresses. Save the page as an HTML file, or paste its HTML, and convert that.

How do I get accents and symbols right?

Save the page as UTF-8 and add <meta charset="utf-8"> to its head, so every character is read correctly.

What this tool does with a page

It draws an HTML page onto A4 or Letter paper and saves it as a PDF, using the page’s own styles. You can upload a saved HTML file or paste the HTML, and choose the margin. It is a good way to turn an invoice, a report or a generated page into a document you can send.

It cannot convert a web address. Save the page from your browser, or copy its HTML, and convert that.

Why it is built this way

A page can ask for pictures, styles and fonts from other addresses, and a page can run scripts. If the server did either for any page it was given, it could be made to reach places it should not. So no script runs and nothing is fetched: styles must be inside the page in a style tag, and pictures must be embedded in it as data: addresses.

Save the page as UTF-8 and add a charset line to its head so accents and symbols come out right. The page is deleted as soon as your download is ready, and within one hour at the latest.

Related tools