Convert HTML to PDF from your .html file

A web page, printed to a page, without the print dialog.

or drop your HTML anywhere on this page

HTML → PDF

HTML file or live web page: which do you have?

To convert HTML to PDF, drop your .html or .htm file on the tool above and press Convert to PDF. You get a PDF on A4 pages, named after your file, with the text kept as text you can select and search. For pictures of the pages instead, convert HTML to JPG or convert HTML to PNG.

This HTML to PDF converter needs the file itself: a page saved from your browser, an export or an email template. When you have one, convert the HTML file to PDF here. When you only have a web address, open the page in your browser, use Print and choose Save as PDF. For other files, use their own converter:

How to convert HTML to PDF

  1. 1
    Select or drop your HTML file

    Nothing uploads until you press convert.

  2. 2
    Choose your options

    We show the route and its fidelity grade up front.

  3. 3
    Download your PDF

    Then it is deleted after 24 hours, automatically.

What you are starting with

A document as markup. Opens in a browser, edits in anything.

What you are getting

A page, frozen. Looks identical everywhere, resists editing everywhere.

Worth knowing

The page is laid out as a word processor would print it, not as a browser draws it: side-by-side boxes stack, hidden parts show, print styles are ignored, web fonts become a standard font and scripts do not run.

Good to know about converting HTML to PDF

  • It converts an .html file you upload, not a live web address.
  • Links stay clickable, and images embedded in the file are kept. Images it links to, on another web address or as a separate file, are left out.
  • Colours and font sizes are applied, but modern layout such as flexbox is not: boxes meant to sit side by side come out stacked.
  • JavaScript does not run, so anything a script would add to the page is missing.

Getting a clean PDF from your HTML file

The file is laid out the way a word processor would, not the way a browser draws it. These tips come from test files we converted:

  • Embed your pictures. Only the .html is uploaded, so a picture from another web address or saved beside the file is left out. One written into the HTML as a data URI is kept.
  • Use a table for anything side by side. Flexbox, CSS grid and floats come out stacked, while table cells stay in a row.
  • Delete what you do not want printed. Content hidden with display: none still shows, so remove cookie notices and menus first.
  • Expect standard fonts. A web font from another address falls back to a plain sans-serif. Arial, Times New Roman and Courier New are drawn with fonts of the same widths.
Tip: Embedded photos can make a large PDF. The PDF size reducer makes its pictures smaller and keeps every page and its text.

Page size, margins and print styles

Pages are A4 and upright, with no page size or orientation option, so US Letter is not offered as a choice. In our tests the text sat 2 cm from the left edge and about 1 cm from the other edges.

If you can edit the HTML, a CSS @page rule in it changes the page:

  • size: 8.5in 11in gives US Letter, and sizes in millimetres work too. Names such as letter or A5 are ignored.
  • size: landscape turns the A4 page on its side, and margin: 1in sets a 1 inch margin.
  • page-break-before: always starts a new page, but the newer break-before: page does not.

Rules inside an @media block, for print or for screen, are skipped, so put the rules you need outside one.

Questions people ask

How do I convert an HTML file to PDF?

Drop the .html or .htm file on the tool at the top of this page, press Convert to PDF and download the PDF, on A4 pages and named after your file. Up to 25 MB and three conversions a day are free, with no account.

Can I save a website as a PDF by entering its address?

No. This page converts an .html file you upload. For a faithful copy of a live page, use your browser's Print and choose Save as PDF, which keeps its layout and images.

Why are images missing from my PDF?

Only the .html file is uploaded, so pictures it loads from other web addresses, or from files saved beside it, are not there to use. Each leaves a blank space. Pictures embedded in the file are kept.

Why did my side-by-side layout stack up?

Modern layout such as flexbox is not applied, nor CSS grid or floats, so boxes meant to sit side by side come out stacked. Table cells stay in a row, so use a table for columns.

Does JavaScript run when converting HTML to PDF?

No, so anything a script would add to the page or change on it is missing. Text written into the HTML itself comes through as it is.

Can I choose US Letter instead of A4?

Not with an option on this page, which makes A4 pages. If you can edit the file, the CSS rule @page { size: 8.5in 11in; } gives US Letter pages.

Is converting HTML to PDF free?

Yes. Up to 25 MB and three conversions a day are free, with no account. Pro and Business lift the file limit to 100 MB and remove the daily cap.

What happens to my files?

Both your HTML and the PDF we produce are deleted 24 hours after each conversion, automatically. Try again and Continue to another tool start a new conversion, with its own 24 hours. Nothing is used for training and no human looks at your documents.

Will the PDF look exactly like the HTML?

This pair grades as “Good enough”. We show the exact route and that grade before you convert, so there are no surprises about what survives the trip.

Do I need to install anything?

No. Nothing to install. Pick or drop a file here, it's converted on our servers, and you download the result.

How large can my file be?

25 MB on the free plan, and 100 MB on Pro and Business.

Can I convert several files at once?

On Pro and Business, yes: add up to 100 files before converting. The free plan converts one file at a time.

Related conversions

Our cookies keep you signed in. If you accept, we also load Google Tag Manager, which runs Google Analytics and Microsoft Clarity (which records how you move around the site). None of them run unless you accept. The privacy page has the details.

Read first