HTML to PDF
Upload an HTML file, such as an exported report, an invoice your system generates, an email template or a saved web page, and get a paged PDF that keeps its fonts, tables and links. If the file has print styles, they shape the pages.
Convert to PDF
or drop DOC, DOCX, DOCM … files here ·
Max 95 MB per file· Up to 20 files· Deleted after 30 minutes
Files are processed on our servers and deleted after 30 minutes.
Convert the whole document or only some pages, slides or sheets.
Pages or slides to keep, e.g. 1-3, 5, 8-10. Numbers refer to the original document.
Source margins keep the document's own layout. Narrow is 12.7 mm, normal 25.4 mm, wide 50.8 mm left and right.
Excel, ODS and Numbers files: convert every sheet, or only the one that was open when the file was saved.
JPEG quality for photos inside the document. 90 looks identical to the source; lower it to make the PDF smaller.
Leave empty for no password. If set, the PDF asks for it before opening. Not available with PDF/A.
How to use this tool
- 1
Upload the .html or .htm file
Add up to 20 files, each up to 95 MB. To convert a page from the web, save it first with Ctrl+S, or Cmd+S on a Mac, and upload the .html file.
- 2
Choose page size and margins
Page size on Same as source follows an @page rule in the file. Force A4 or Letter, landscape Orientation or other Margins under Advanced settings.
- 3
Convert to PDF
Press Convert to PDF and download the result. Uploads and PDFs are deleted after 30 minutes.
HTML to PDF free: which files convert cleanly
HTML files that carry everything inside them convert best: styles in a <style> element, images embedded or linked with full https:// addresses, fonts loaded with @font-face. That describes most generated documents, from invoices and statements to test reports, documentation exports and HTML email templates, which are built self-contained because mail clients block external files.
A page saved from a website is different. With Webpage, Complete, the browser writes the .html file plus a folder of images and stylesheets next to it, and that folder is not part of the upload. If the PDF from such a page looks bare, print it from the browser instead, or clean the content up first; the HTML to Word converter is handy when you want to cut menus and footers before making the PDF.
How CSS pixels map to A4 and Letter pages
| Size | Pixels | cm | in | DPI | Fits |
|---|---|---|---|---|---|
| A4 | 794 × 1123 | 21.0 × 29.7 | 8.27 × 11.69 | 96 | Usable width about 602 px with 25.4 mm margins |
| Letter | 816 × 1056 | 21.6 × 27.9 | 8.5 × 11 | 96 | US default; usable width about 624 px with 1 in margins |
| Legal | 816 × 1344 | 21.6 × 35.6 | 8.5 × 14 | 96 | Long US contracts and forms |
| A3 | 1123 × 1587 | 29.7 × 42.0 | 11.69 × 16.54 | 96 | Wide dashboards and schedules |
| A5 | 559 × 794 | 14.8 × 21.0 | 5.83 × 8.27 | 96 | Booklets and receipts |
CSS defines one inch as 96 px, so a page has a fixed width in the same units your stylesheet uses. A layout designed for a 1280 px desktop window has roughly 600 px to work with on an A4 page with normal margins. Responsive pages fall back to their narrower layout and print well; pages with a fixed 1000 px wrapper get scaled down or clipped, depending on the renderer. Setting Margins to Narrow (12.7 mm) wins back about 100 px of width.
Print CSS that controls page breaks in the PDF
@page { size: A4; margin: 15mm; }
@media print {
nav, footer, .cookie-banner { display: none; }
h2, h3 { break-after: avoid; }
table, figure, pre { break-inside: avoid; }
.new-section { break-before: page; }
}The @page rule comes from the W3C's CSS Paged Media module and sets the sheet size and margins. The break-before, break-after and break-inside properties belong to CSS Fragmentation and replace the older page-break- properties, which browsers still accept as aliases. Web fonts need one more check: a font loaded from a server the converter cannot reach falls back to a system font, and with Embed fonts* on, the PDF then embeds that fallback. Keep the font files reachable at full https:// addresses.
HTML
HyperText Markup Language
HTML is the markup language of the web, first described by Tim Berners-Lee in the early 1990s and now maintained by WHATWG as a living standard. An HTML file describes headings, paragraphs, links, tables, images and forms, while styling usually comes from CSS. Every browser renders it, and it is also used for email templates and saved web pages. A single HTML file often depends on external images and stylesheets, so it may look broken when moved on its own.
- Compression
- –
- Transparency
- –
- Animation
- –
- Introduced
- 1993 · Tim Berners-Lee; maintained by WHATWG
Portable Document Format
PDF was created by Adobe in 1993 and became the open ISO 32000 standard in 2008. It fixes text, fonts, images and layout so a document looks the same on every screen and printer. PDFs can contain forms, signatures, links, attachments and searchable text, and the PDF/A variant is used for long-term archiving. The fixed layout makes PDFs hard to edit, and scanned PDFs contain only images unless OCR is applied. Every browser and operating system can open them.
- Compression
- –
- Transparency
- Yes
- Animation
- No
- Introduced
- 1993 · Adobe
HTML reflows to fit whatever window opens it and depends on fonts, scripts and images that live elsewhere; a PDF fixes one paged version that can be filed, attached to an invoice email or submitted where a portal accepts only documents.
HTML to PDF questions
Can I convert a live web page by pasting its address?
No, this converter works on files. Save the page from your browser and upload the .html file, or use the browser's own Print dialog with Save as PDF as the destination, which is the better route for pages behind a login or full of images that load from the site.
Why are background colors missing from my HTML to PDF output?
Print rendering drops backgrounds by default to save ink, in browsers and in most converters. Add print-color-adjust: exact to the elements whose colors must survive, such as table header rows and status badges, and they are kept.
Do links in the HTML stay clickable in the PDF?
Links with full addresses usually stay clickable. Relative links like /pricing lose their website once the file leaves it, so rewrite them as complete https:// addresses if readers will follow them from the PDF.
Why is my wide table cut off on the right side of the page?
The table is wider than the printable area, often because of a fixed pixel width. Set Orientation to landscape, or give the table width: 100% and smaller cell padding in your print CSS so it wraps to the page.
Can several HTML files become one PDF?
Each upload becomes its own PDF, up to 20 per batch. Put them in order with Merge PDF afterwards; naming the files 01, 02, 03 before uploading keeps the order obvious.