HTML to PDF
Turn an HTML file into a PDF with real, selectable text, using your browser's own print engine. Paper size and margins set for you; scripts never run.
Or paste HTML code
How it works
Upload an HTML file
An invoice, a report, a saved web page, an email template. It is shown here with its scripts switched off, so nothing in it runs.
Choose the page
Paper size (or your own in millimetres), orientation, margins and zoom; a header and footer with page numbers, the date and the title; a watermark; your own CSS.
Save as PDF
Your browser's print window opens with the page set up; choose Save as PDF. The text stays real text you can select and search, not a picture of it.
HTML to PDF converter online, free
HTML to PDF here uses your browser’s own print engine, so text stays real, selectable and searchable, links keep working and CSS print rules are respected. It is html to pdf free and an html to pdf converter online free with no sign-up.
This html to pdf converter takes an html file to pdf, several at once, or pasted code. Local html to pdf means the file is read on your computer, never uploaded, and its scripts never run. Set the paper size, margins, a header and footer with page numbers, a watermark and your own CSS; "Clean page breaks" stops rows and pictures splitting across pages.
To convert html to pdf from a live site, use the webpage to PDF page, which is the url to pdf converter: paste the link and download.
Chrome HTML to PDF, and why use this instead
In Chrome you can press Ctrl+P and choose "Save as PDF", which is the same engine this page uses. Chrome html to pdf leaves you to set headers, page numbers and breaks by hand for every file; here they are set once and applied to a whole batch.
An iLovePDF or Adobe alternative for HTML to PDF
Looking for html to pdf ilovepdf or html to pdf adobe? Those upload your file to a server. This does the conversion in your browser, which matters for invoices, contracts and anything private.
HTML to PDF converter app or AI?
There is no html to pdf converter app to install: it runs on this page. And no html to pdf ai is needed or used: the layout is the one your HTML and CSS already describe, printed faithfully.
People also search for
- html code to pdf
- save html as pdf
- html to image
- html to word
- print html to pdf
Why it matters
Real text, real links
The PDF is made by the same engine that draws web pages, so text is selectable and searchable, and the file stays small, unlike a screenshot saved as PDF.
Nothing runs, nothing is sent
The HTML is displayed with its scripts switched off and never leaves your computer. A file from somewhere you do not trust cannot do anything here.
Page set up for you
Paper size, orientation and margins are applied before the print window opens, and background colours print, which browsers switch off by default.
Questions
How do I convert an HTML file to PDF?
Drop the .html file here (or paste the code), choose paper and margins, and download the PDF.
Will the PDF have selectable text?
Yes. Text is text, not a picture, so it can be searched, copied and read by screen readers.
Why do my tables split across pages?
Leave "Clean page breaks" ticked, which adds clean page-break rules so rows and pictures move to the next page instead of being cut.
Why does a print window open instead of a download?
Laying out HTML into pages is the browser's job, and its print engine is what makes a PDF with real, selectable text. This page sets it up; you choose Save as PDF (or Microsoft Print to PDF) as the printer.
Why are some images missing?
An HTML file on its own cannot bring the pictures it points to by a relative path, like images/logo.png. Images embedded in the file, or linked by a full https:// address, are included. The page counts any that could not load.
Do the scripts in my HTML run?
No. The file is shown with scripts switched off, so pages that build their content with JavaScript will be missing that content. Save such a page from the browser after it has loaded, as a complete web page, then convert it.
Can I add a header, a footer and page numbers?
Yes. Type a header or footer and use {{page}}, {{total}}, {{date}} and {{title}} where the page number, the page count, today's date and the document title should go - "Page {{page}} of {{total}}" prints as Page 1 of 3 on the first page. They print in the page margin on every page, and the text stays selectable.
Can I add a watermark like DRAFT or CONFIDENTIAL?
Yes. Type the text and pick how strong it is; it is printed diagonally across the middle of every page, over the content, lightly enough to read through.
Can I paste HTML code instead of uploading a file?
Yes. Open "Or paste HTML code" and paste a whole page or just a fragment such as a table; a fragment is set in a clean page with ordinary fonts.
Can I convert many files, or a whole web page?
Yes, with Webpage to PDF: it takes any number of HTML files, or pages saved from Chrome or Edge as "Webpage, Single File" (.mhtml) with their pictures and styles, and returns the PDFs together in one zip. It also makes Word documents and PNG or JPG pictures of pages.