HTML to PDF

Convert HTML web pages to formatted PDF documents

Click to upload or drag and drop
HTML, HTM up to 10 MB each, 3 at a time
Without an account: 5 tasks a day, files up to 10 MB. Free account: 25 tasks a day, files up to 50 MB.

Files to convert (0)

5 of 5 free tasks left today

Converting, please wait...

Converted

Download PDF

About HTML to PDF

HTML to PDF turns an HTML file into a PDF, applying its CSS for fonts, colours and layout. Use it to archive a page you built, print an HTML report, or send an email template or invoice as a PDF.

How to use HTML to PDF

  1. Click Click to upload or drag your .html file onto the box.
  2. Click Convert to PDF.
  3. Click Download PDF.

What people use it for

  • Reports from code

    Turn HTML reports exported by an app or script into shareable PDFs.

  • Templates

    Check how an HTML invoice, letter or newsletter looks as a printed document.

  • Archiving

    Keep a fixed copy of a saved web page or documentation page.

  • Printing

    Get clean page breaks and margins instead of printing from the browser.

Good to know

What is supported. Modern HTML and CSS, including flexbox and grid layouts, web fonts, tables and print rules such as @page for page size and margins and page-break properties. Without @page rules the PDF uses A4 pages with standard margins. Links stay clickable, and text stays selectable and searchable.

Images and stylesheets. Styles inside the file are always applied. Images and stylesheets are loaded when they use full public web addresses (https://...) or are embedded as data: URLs. Paths to files next to your HTML file, such as images/logo.png, cannot be found, because only the HTML file is uploaded; embed them or use full addresses. For security, addresses on private networks and the server itself are never loaded.

Scripts. JavaScript is not run, so content that a page builds with JavaScript does not appear. Save the page from your browser after it has loaded, or use a static HTML version.

Files must be UTF-8 encoded, which almost all editors use by default.

Several at once. Add several files together, up to your batch limit; each counts as one task. You get one PDF per file in a ZIP, or tick Merge into one PDF for a single PDF, in the order of the list.

Questions about HTML to PDF

Can I convert a web page by its address?

Not here: this tool converts an HTML file you upload. Save the page from your browser as HTML (Ctrl+S or Cmd+S) and upload that file, or use the PDF Coder browser extension, which saves the page you are on as a PDF.

Why are images from my HTML missing?

They are referenced by a relative path, such as images/photo.jpg, which the server cannot reach. Use full https:// addresses or embed the images as data: URLs.

Is my CSS used?

Yes. Styles in style elements, in style attributes and in stylesheets at public addresses are applied, including print styles.

How do I set the page size or margins?

With CSS: for example @page { size: Letter landscape; margin: 2cm; }. Without it, pages are A4.

Does JavaScript run?

No. Only the HTML and CSS are rendered.

How do I start a new page at a certain point?

Add break-before: page (or page-break-before: always) to the element that should start a new page.

Can I convert several HTML files at once?

Yes. Add the pages together: each becomes a PDF, or tick Merge into one PDF for one file.

Is it safe to upload my files?

Files travel over an encrypted HTTPS connection and are used only to produce your result. They are deleted automatically within 2 hours, never backed up, and never used for analytics or AI training. Our staff do not open them.

Do I need an account?

No. Without an account you get 5 tasks a day with files up to 10 MB. A free account, with a verified email address, raises that to 25 tasks a day and files up to 50 MB.