How to Convert a Web Page or HTML File to PDF
Try it free — no sign-up needed
Use PDF Mate's Word to PDF tool directly in your browser.
The Fastest Method: Print to PDF From Your Browser
Every major browser can save any web page as a PDF without installing anything:
- Open the web page in Chrome, Firefox, Edge, or Safari.
- Press Ctrl+P (Windows) or ⌘+P (Mac) to open the print dialog.
- Set the destination/printer to "Save as PDF" (Chrome) or "PDF" (Mac).
- Click Save — the PDF is created and downloaded instantly.
This captures exactly what you see in the browser, including images and basic formatting. Background colours are optional — enable "Background graphics" in the print options if you want to include them.
Printing Tips for Cleaner PDFs
- Use Reader Mode (Firefox and Safari) before printing to strip ads and navigation elements, leaving only the article text.
- Set the paper size to A4 or Letter depending on your region.
- Disable headers and footers in the print settings if you don't want the URL and date printed on every page.
Converting an HTML File (Not a Live Web Page)
If you have a local .html file, open it in your browser (drag it onto a browser window or use File → Open) and use the same Print → Save as PDF method. The browser renders the HTML locally and produces an identical PDF.
For Developers: Programmatic HTML-to-PDF Conversion
Headless browser tools like Puppeteer (Node.js) and Playwright can generate PDFs from HTML programmatically — useful for creating invoices, reports, or certificates at scale. Both offer a page.pdf() method that renders the page and outputs a PDF file.
What About CSS and Fonts?
Locally installed fonts and local CSS files render correctly when using the browser's print function. Web fonts (Google Fonts, etc.) require an active internet connection to load. If fonts appear wrong, check your connection or embed fonts in the HTML before printing.