Convert HTML to PDF
An invoice generated by a script, a report exported as a web page, a receipt saved from a browser: all of them are HTML, and none of them are much use as an attachment. This renders the file with a real browser engine and prints the result to PDF, so the page arrives looking the way it looks on screen — stylesheets applied, backgrounds printed, web fonts loaded, layouts that use flexbox or grid laid out properly rather than collapsed into a column. Choose A4 or Letter, portrait or landscape, and normal printer margins or none at all for a page designed to run to the edge. Upload the file itself rather than an address: it means nothing of ours goes looking for a page on the internet on your behalf. Anything the page references by URL is fetched, so a page whose styles sit on a server will still find them.
How it works
Upload your HTML file
A saved page or an exported document. It has to begin with a doctype or an html tag.
Choose the paper
A4 or Letter, portrait or landscape, and whether you want printer margins.
Convert and download
The PDF is ready to download, and is deleted from our servers two hours later.
Frequently asked questions
- Can I give you a web address instead of a file?
- Not today. The tool takes a file you upload. Fetching a page from an address means our servers making requests on a stranger's behalf, which is a decision we would rather make deliberately than by accident.
- Will my stylesheet and images be used?
- Yes, including ones the page loads from the internet. A stylesheet sitting next to the file on your own disk cannot be reached, so inline the styles or link them by URL.
- Does JavaScript on the page run?
- Yes. The page is rendered by a browser, so scripts run before it is printed, which is what makes a page that draws a chart convert with the chart in it.
- Why is my background colour missing?
- It should not be. Backgrounds are printed on purpose here, unlike a browser's own print dialogue, which drops them unless you ask.
- How do I get a page with no white border?
- Choose no margins. The page then runs to the edge of the paper, which is what a designed document usually wants and what a printer usually cannot do.
- Which files are accepted?
- A file that begins with a doctype or an html tag, ignoring any byte order mark and whitespace. A fragment that starts partway into a document is refused rather than guessed at.