Save HTML as PDF in Chrome, Edge, Safari or Firefox (or use a converter)

Built-in Save as PDF in every major browser, the settings that matter, and when to use a converter instead.

Updated · 5 min read

Every modern browser can already save a page as a PDF. For a one-off page you are looking at, that is often the quickest option. For HTML you want to convert the same way every time, from any device or from code, a converter is more predictable. Here is how to do both.

To open a local HTML file first

Double-click the .html file, or drag it onto a browser window. It opens like any webpage, and the steps below work the same.

Chrome and Edge (Windows, Mac, Linux)

  1. Press Ctrl+P (Cmd+P on a Mac).
  2. Set the destination or printer to Save as PDF.
  3. Under More settings, check paper size and margins, untick Headers and footers to remove the date and web address, and tick Background graphics to keep colours.
  4. Click Save.

Safari (Mac)

Choose File → Export as PDF. For paper size and backgrounds, use File → Print instead, set the options, and pick Save as PDF from the PDF menu.

Firefox

Press Ctrl+P (Cmd+P on a Mac) and choose Save to PDF as the destination. Backgrounds and headers are under More settings.

iPhone, iPad and Android

On iPhone or iPad, open the page in Safari, tap Share, then Print, and use the share button in the print options to save the PDF to Files. In Chrome on Android, open the menu, tap Share, then Print, and choose Save as PDF. Menu names vary a little between versions.

Browser or converter?

Browser Save as PDF is better whenA converter is better when
The page is behind a login or on a private networkYou want the same result on every device
The document is sensitive and shouldn’t leave your computerYou have HTML code, not a page open in a tab
You need fonts installed only on your computerYou want to automate it with an API
It is a one-off page you already have openColleagues need clean output without changing print settings

How htmltopdf.online differs from your browser

  • No headers or footers added. Your PDF has no date, title or URL unless you add them with CSS margin boxes.
  • Backgrounds print by default. There is no box to remember to tick; see what prints.
  • Server fonts, not yours. Fonts installed on your computer aren’t available. Use web fonts for a specific look.
  • Public pages only. The converter can’t see pages behind a login. Copy their HTML instead.
  • Tagged and linked. PDFs keep clickable links and include accessibility tags.