Use this free tool to turn HTML into a PDF you can save, print, or send. Paste your HTML code or choose an HTML file, pick a page size, and download the result. The conversion runs in your browser, so your code stays on your device and is not uploaded to our servers.

Converting HTML to PDF is useful for invoices, reports, resumes, receipts, and email templates that you want to keep as a fixed, shareable document.

How to convert HTML to PDF

  • Add your HTML: click the box to choose an .html file, or paste your code into the text area.
  • Choose page settings: pick A4, Letter, or Legal, portrait or landscape, a margin, and a quality level.
  • Convert: press Convert to PDF and wait while the tool draws each page.
  • Download: check the page count and file size, then save the PDF to your device.

Page settings

SettingOptionsBest for
Page sizeA4, Letter, LegalA4 for most countries, Letter for the US and Canada
OrientationPortrait, LandscapeLandscape suits wide tables and dashboards
MarginNone, Small, NormalNone for designs that fill the whole page
QualityStandard, HighHigh for small print, Standard for smaller files

What this tool does and does not do

The tool draws your HTML and CSS the way a browser would, then saves each page of the result as an image inside a PDF. This keeps the layout looking the same, but the text in the PDF cannot be selected, searched, or copied, and links are not clickable. JavaScript in your HTML does not run. Images, fonts, and stylesheets that are linked from other websites are loaded from those websites, and some may be blocked by the site that hosts them. For the best result, include your CSS inside the HTML and use images embedded as data URLs. This tool does not convert a web address, so save the page as an HTML file or copy its code first.

Tips for better results

  • Put your CSS in the file: use a <style> tag in the HTML so the layout does not depend on outside files.
  • Embed your images: images saved as data URLs always load, while linked images may be blocked.
  • Use a fixed width design: pages are drawn at the width of the chosen paper, so layouts that use percentages work best.
  • Watch the page breaks: a page may cut through a line of text or an image, so leave space where you want sections to split.
Turning HTML into a PDF makes a page easy to share, print, and archive. Convert your code in seconds with a free online tool that keeps your files on your own device.

Common HTML to PDF problems

  • Images are missing: the website that hosts them may block use on other pages. Embed the images in your HTML instead.
  • Layout looks different: styles loaded from outside files may not apply. Put your CSS inside the HTML.
  • Page is blank: check that your HTML has visible content and a background that is not white text on white.
  • PDF is too large: choose Standard quality, a smaller page size, or shorter content.

Frequently asked questions

Is my HTML uploaded?

No. The conversion runs in your browser, and your HTML stays on your device. Images or fonts that your HTML links from other websites are loaded from those websites.

Can I select text in the PDF?

No. Each page is saved as an image to keep the layout exact, so the text cannot be selected, searched, or copied.

Does JavaScript in my HTML run?

No. Scripts are turned off, so only your HTML and CSS are used to draw the page.

Can I convert a website by entering its URL?

No. The tool works with HTML code or an HTML file. To convert a web page, save it as an HTML file or copy its code and paste it in.

Why are some images missing?

Some websites block their images from being used on other pages. Embed the images in your HTML as data URLs, or save them with your file, so they always appear.

How many pages can I create?

Up to 100 pages in one PDF. For longer documents, split your HTML into parts and convert each one.

Share this article