How to Convert HTML to PDF on Mac: Safari, Chrome, Preview and No-Upload Methods
How to convert HTML to PDF on Mac with Safari, Chrome or Preview, set paper size and margins, fix missing images and keep private files off the web.

On this page
- What happens when a Mac turns HTML into a PDF
- Method 1: Our free browser converter (no upload)
- Method 2: Safari, Export as PDF
- Method 3: Google Chrome on Mac
- Method 4: Preview and the Mac print system
- Method 5: Terminal with headless Chrome
- How to convert HTML to PDF on Mac: methods compared
- Paper sizes to pick on a Mac
- Why privacy matters for HTML files
- Troubleshooting HTML to PDF on a Mac
- A worked example from our team
- Frequently asked questions
- Conclusion: key takeaways
- Editorial policy
- Content transparency
- About the author
To convert an HTML file to PDF on a Mac, open the file in Safari and choose File, then Export as PDF. If the layout breaks or images are missing, use File, then Print, then PDF, then Save as PDF in Safari or Chrome, or drop the file into our free HTML to PDF converter, which runs in your browser and never uploads the page. Each method below takes under a minute, and this guide shows how to convert HTML to PDF on Mac with selectable text, the right paper size and no surprises.
Quick answer: The fastest built-in route on macOS is Safari.
- Right-click the .html file, choose Open With, then Safari.
- In Safari, choose File, then Export as PDF, name the file and click Save.
- For paper size and margins, use File, then Print, open the PDF menu and choose Save as PDF.
- For saved emails, newsletters or private pages, use the no-upload HTML converter with remote images switched off.
What happens when a Mac turns HTML into a PDF
An HTML file is a set of instructions, not a finished page. A browser reads the markup, loads styles and images, runs scripts and then paints the result. A PDF is the opposite: a fixed snapshot with set page sizes. So every Mac method is really “render the page, then print it to paper-sized sheets”.
That explains most problems people hit. Images saved in a separate “_files” folder may not load, scripts may change the layout after printing starts, and wide pages get cut at the right edge. Picking the right method for your file avoids all three.
Method 1: Our free browser converter (no upload)
This is the option we use most for client files, because nothing leaves the Mac.
- Open LeadCanal’s HTML to PDF tool in Safari, Chrome or Firefox.
- Drop one or more .html, .htm or .xhtml files onto the page. The tool checks the file extension and the first bytes, so renamed programs or scripts are refused.
- Choose A4, Letter or Legal, the orientation, the margins and the layout width.
- Leave remote images off unless you need them. Switch them on only for pages that load pictures from the web.
- Download an exact image PDF, or use the Print to PDF option when you need selectable text.
Before drawing the page, the tool removes scripts, forms, frames and external stylesheets, then shows it in a locked frame that cannot run code or contact other sites. Several files can be downloaded one by one or together as a ZIP.
Method 2: Safari, Export as PDF
Safari is already on every Mac and handles most saved pages well.
- Right-click the HTML file in Finder and choose Open With, then Safari. You can also open Safari and press Command-O.
- Check that the page looks right and that images loaded.
- Choose File, then Export as PDF.
- Pick a name and folder, then click Save.
Export as PDF produces one tall page split by Safari’s own logic, with clickable links in most cases. It does not let you pick margins. If you need A4 or Letter with set margins, use the print route instead.
Safari print route with page size
- With the page open, choose File, then Print, or press Command-P.
- Click Show Details if the panel is small, then set Paper Size and Orientation.
- Tick Print backgrounds if colored boxes or highlights should appear.
- Open the PDF menu at the bottom left and choose Save as PDF.
Method 3: Google Chrome on Mac
Chrome gives more layout control than Safari, which helps with wide tables and email templates.
- Drag the .html file onto a Chrome window.
- Press Command-P to open the print preview.
- Set Destination to Save as PDF.
- Open More settings and adjust Paper size, Margins and Scale. Tick Background graphics to keep colors.
- Click Save.
Google documents the print dialog in its Chrome Help page on printing. Setting Scale to around 80 percent usually fixes pages that are cut on the right.
Method 4: Preview and the Mac print system
Preview cannot open an HTML file directly, but every Mac app that prints can save a PDF through the same system dialog. That means TextEdit, Mail and Pages can all be part of the chain.
- TextEdit: it opens simple HTML as formatted text. Choose File, then Export as PDF. Good for plain pages, poor for modern layouts.
- Preview after printing: once you have a PDF from Safari or Chrome, open it in Preview to delete blank pages, reorder pages or combine several PDFs by dragging thumbnails into the sidebar.
Apple explains the shared PDF option in the macOS User Guide.
Method 5: Terminal with headless Chrome
If you convert files often, Chrome can print a page to PDF without opening a window. Run this in Terminal from the folder that holds the file:
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --headless --print-to-pdf=page.pdf "file://$PWD/page.html"
This is handy for many files at once. Our sibling guide on how to convert multiple HTML files to PDF shows a loop that processes a whole folder.
How to convert HTML to PDF on Mac: methods compared
| Method | Cost | Upload needed | Page size control | Best for |
|---|---|---|---|---|
| LeadCanal converter | Free | No | A4, Letter, Legal, margins, width | Private files, several pages, newsletters |
| Safari Export as PDF | Free | No | None | Quick single page |
| Safari Print, Save as PDF | Free | No | Paper size, orientation | Printable documents |
| Chrome Save as PDF | Free | No | Paper, margins, scale | Wide tables and templates |
| Headless Chrome in Terminal | Free | No | Set in the page CSS | Repeat jobs and folders |
| Online upload sites | Free or paid | Yes | Varies | Public pages only |
Paper sizes to pick on a Mac
| Paper | Size in inches | Size in mm | Where it is used |
|---|---|---|---|
| Letter | 8.5 x 11 | 216 x 279 | US and Canada |
| Legal | 8.5 x 14 | 216 x 356 | US contracts and forms |
| A4 | 8.27 x 11.69 | 210 x 297 | Most other countries |
Why privacy matters for HTML files
Saved HTML often holds more than it shows. Newsletters carry tracking pixels that report when the file is opened. Saved account pages can include names, order numbers and session details. Uploading those to an unknown site hands the whole file to a third party.
So when you decide how to convert HTML to PDF on Mac for private files, choose a method that works offline. Our in-browser converter for .html files runs inside your browser, so the file never leaves your Mac and nothing is saved on our servers. Remote images stay off by default, so opening a saved newsletter does not tell the sender you read it.
Troubleshooting HTML to PDF on a Mac
Images are missing
When you save a web page as “Web Page, Complete”, the images go into a separate folder. Keep that folder next to the HTML file and open it in Safari or Chrome. In our tool, images from a saved-page folder cannot be read by a browser and show as their alt text, so switch on remote images if the pictures live online.
The page is cut off on the right
Switch to landscape, lower the Scale in Chrome, or set a narrower layout width in the browser-based HTML to PDF tool.
Colors and backgrounds disappear
Tick Print backgrounds in Safari or Background graphics in Chrome.
I need to search or copy the text
Use a print route. An exact image PDF looks identical to the page but its text is part of the picture.
The PDF is too big to email
Our guide on how to reduce PDF size on Mac covers Preview and ColorSync, or you can run the result through the PDF compressor.
A worked example from our team
We build lead lists and handle client files every day, and a common request is “send me this report as a PDF”. Last month a client sent a saved HTML export from their CRM: a 40-row table, a logo and several remote tracking images.
Safari’s Export as PDF cut the table across two awkward pages. Chrome at 100 percent scale lost the last two columns. We dropped the file into our converter, chose Letter, landscape and narrow margins, kept remote images off and downloaded the PDF. The table fit on one page, the logo was replaced by its alt text, and no tracker fired. That job is a good test of how to convert HTML to PDF on Mac when one method is not enough. When the client asked for searchable text, we reopened the file in Chrome at 85 percent scale and saved through the print dialog.
Frequently asked questions
How do I save an HTML file as a PDF on a MacBook?
Open it in Safari, then choose File, then Export as PDF. For paper size and margins, use File, then Print, then Save as PDF from the PDF menu.
Can Preview open HTML files?
No. Open the file in Safari, Chrome or TextEdit first, print it to PDF, then edit the PDF in Preview.
Why is my HTML to PDF on Mac missing images?
The images are usually in a separate folder or on a server. Keep the “_files” folder beside the HTML file, or turn on remote images in our tool if the pictures are online.
Is there a free HTML to PDF converter for macOS?
Yes. Safari and Chrome are free, and the LeadCanal tool works in any modern Mac browser with no signup, no watermark and no daily cap.
How do I keep links clickable in the PDF?
Use Safari’s Export as PDF or the print dialog in Safari or Chrome, which usually keep links active. An image PDF does not keep clickable links.
Can I convert HTML to PDF on a Mac without Chrome?
Yes. Safari’s Export as PDF and the print dialog both work on a fresh Mac with no extra software.
How do I convert an HTM file on a Mac?
An HTM file is the same as an HTML file with a shorter extension. Every method in this guide treats them the same way.
Conclusion: key takeaways
Learning how to convert HTML to PDF on Mac comes down to picking the right renderer for the page. Start with Safari, move to Chrome for wide layouts, and use a no-upload tool for anything private.
- Safari’s Export as PDF is the fastest built-in method.
- The print dialog adds paper size, orientation and backgrounds.
- Chrome’s Scale setting fixes pages cut on the right.
- Our browser converter keeps files on your Mac and blocks remote trackers.
- Use Preview afterwards to reorder, delete or merge pages.
- Browse more free file tools from LeadCanal for the next step, such as the EML to PDF converter for saved emails.
On an iPhone instead? See our guide on how to convert HTML to PDF on iPhone. For emails saved as .eml rather than .html, read how to convert EML to PDF.
Editorial policy
We write guides about tasks our team does every day, test every method on current macOS and browser versions, and update pages when menus change.
Content transparency
This guide was researched with keyword data and checked against official documentation from Apple and Google. LeadCanal offers the free tools mentioned in this article.
About the author
The LeadCanal team builds lead lists, cleans CSV and VCF data and converts client files daily. We built our free converters to handle that work without uploading anyone’s data.