Skip to content
Devtoolry

HTML to PDF Converter

Convert HTML to a downloadable PDF online with live preview, paper sizes, orientation, margins, page breaks and page numbers. Your file is not stored.

Uses our server · What is sentFree · No sign-up · No daily limit

Something not working, or missing a feature? Send feedback

About the HTML to PDF Converter

The HTML to PDF Converter renders your HTML with a real browser engine and returns a PDF. Paste the code or open an .html file to convert HTML to PDF online. Choose the paper size, orientation and margins, add page numbers, and control page breaks with CSS.

Conversion happens in your browser, so your files and records stay private.

How to use the HTML to PDF Converter

  1. Paste HTML or open an .html file and check the live preview.
  2. Choose paper size, orientation, margins and page numbers.
  3. Click Download PDF.

Common mistakes

  • Content split across pages. Tables and images can be cut at a page break. Add break-inside: avoid to rows, figures or cards that must stay together.
  • Screen-only styles. The PDF uses print media, so styles inside @media screen do not apply. Use @media print, or no media query, for the PDF layout.
  • Web fonts loading late. Fonts from a public URL are loaded before rendering, within a time limit. Very large font files may time out, so use WOFF2 and only the weights you need.

Works well with the HTML to PDF Converter

Frequently asked questions

How do I force a page break?

Use the CSS property break-before: page (or break-after: page) on the element that should start a new page.

Are external images and styles loaded?

Public https resources are loaded with size and time limits. Addresses on private networks are blocked for security.

How do I save an HTML file in PDF format?

Choose Open file and pick the .html file (or paste its code), check the preview, then click Download PDF. Without a converter, you can open the file in a browser, press Ctrl+P (Cmd+P on a Mac) and choose Save as PDF; this converter adds fixed paper sizes, margins and page numbers, and gives the same result in every browser.

Why does my PDF look different from the web page?

A PDF uses print rules: the page width becomes the paper width, and CSS inside @media print applies while @media screen rules may not. Background colours appear only with the Background colours switch on, and fixed or sticky elements often print differently. Set widths in % or mm, and add print styles for anything that should change on paper.

Why is the PDF generated on a server?

A browser cannot export a page to PDF without a print dialog, so the HTML is rendered by a headless browser on our server. Your HTML and the PDF are not stored.

Can I use CSS like flexbox and grid?

Yes. Rendering uses a current Chromium engine, so modern CSS works as it does in Chrome.

Guides and tutorials