Convert HTML to PDF

Convert HTML code or .html files to PDF online. Preview, then download or print to PDF. Free.

50 free uses every 24 hoursUnlimited with Pro →

Private by design — your files never leave your deviceEverything is processed right here in your browser. Nothing is uploaded to our server, nothing is stored, and your files are gone when you close the tab.
  • No upload
  • Not stored
  • No sign-up

This HTML to PDF tool lets you convert HTML to PDF online. Paste your code or open an .html file, check the live preview, then download the PDF or print it to PDF. It suits anyone who needs a quick PDF from a receipt, an email template or a simple web page, and it is free to use.

How do you convert HTML to PDF with this tool?

  1. Add your HTML. Paste the code into the editor, or open an .html file from your device.
  2. Check the preview. The live preview shows how the page will look. Fix any problems in your code and the preview updates.
  3. Choose a page size. Pick the paper size that fits where the PDF will be used.
  4. Export. Use "Download PDF" to save a file straight away, or "Print / Save as PDF" to use your browser's print dialog.
How to use the HTML to PDF on OneHubTools: 4 steps with a real screenshot of the tool
How to use the HTML to PDF, step by step.

When you are done here, you might also want the Markdown to PDF or the Text to PDF.

Your HTML is processed in your browser, so nothing is uploaded to a server.

What is an HTML to PDF converter good for?

It works best on self-contained, simple pages. Here are some real examples:

  • Receipts and invoices. Paste the HTML from an order confirmation and keep a PDF copy for your records.
  • Email templates. Turn a finished template into a PDF to send to a client for approval.
  • Simple web pages. Save a small landing page or a document written in HTML as a file you can share.
  • Quick drafts. Test how a block of HTML code to PDF output looks before you use it elsewhere.
Result from the HTML to PDF on OneHubTools — We build fast websites and brands.
What the HTML to PDF gives you.

Download PDF or Print / Save as PDF: which should you pick?

The two export methods give different results. The main difference is whether you can select the text.

MethodText in the PDFPick it when
Download PDFImage-based pages, text not selectableYou only need a quick copy to view or send
Print / Save as PDFSelectable textYou need to copy text from the PDF

If you are unsure, start with Print / Save as PDF. You can always try the other method afterwards and compare.

Tips for best results

  • Use inline styles. This tool is built for HTML with inline styles, so put your CSS directly on the elements.
  • Keep it self-contained. External images and fonts may not load, so a picture that sits on another server can go missing.
  • Stick to common fonts. A familiar font such as Arial or Georgia is safer than a web font you link to.
  • Skip scripts. Scripts are not run, so anything built by JavaScript will not appear. Use plain HTML for the content you need.
  • Check the preview first. If something looks wrong there, it will look wrong in the PDF too.
  • Set the page size before exporting. Changing it afterwards means exporting again.

Why does my PDF look different from the original page?

Usually the cause is something the tool cannot load or run. A few common situations:

  • Missing images. The image is probably hosted elsewhere. Replace it or remove it.
  • Wrong fonts. A linked web font did not load, so a default font was used instead.
  • Empty sections. Content created by a script does not run here. Put the final content directly in the HTML.
  • Text you cannot select. You used "Download PDF", which creates image-based pages. Export again with "Print / Save as PDF".

Can you save an HTML file as a PDF without installing anything?

Yes. This works in your browser, so there is nothing to install. Open your .html file, review the preview and export. Because the file stays on your device, it is a reasonable option for documents you would rather not upload.

What if you only have a website address?

This tool cannot fetch a page from a URL, because browsers block reading other websites. Open the page yourself, then use your browser's Print option and choose Save as PDF. If you have the page's HTML code or a saved .html file, you can paste or open that here instead.

Limits and specs

PriceFree
Free use50 uses every 24 hours — shared with 178 other tools in the “Basic tools” group
Where it runsIn your browser
Sign-upNot needed
Muhammad Shahwaiz Gillani
Maintained and reviewed by Muhammad Shahwaiz GillaniSoftware engineer and founder of OneHubTools · Last reviewed

How we checked it: We tested it in Chrome with sample PDF files and opened each result in a normal PDF reader to check it.

Where the facts come from

According to Wikipedia, PDF was created by Adobe more than 30 years ago and is now an open standard published as ISO 32000. Many email services limit attachments to 20–25 MB, which is why smaller PDFs are easier to share.

Spotted a mistake or the tool did not work for you? Tell us and we will fix it.

Rate this tool

Ratings come only from signed-in users, so every rating is verified.

Only signed-in users can rate tools, so every rating shows a ✔ Verified badge.Sign in to rate

Frequently asked questions

Is this HTML to PDF converter free?

Yes, it is free to use. You can convert as many pages as you like without paying.

Are my files uploaded anywhere?

No, your HTML is processed in your browser. Nothing is sent to a server.

Can I convert an HTML file to PDF?

Yes, you can open an .html file or paste the code directly. Check the live preview, then download the PDF or print it to PDF.

Why can't I select the text in my PDF?

You probably used "Download PDF", which creates image-based pages. Use "Print / Save as PDF" instead to get selectable text.

Why are my images or fonts missing?

External images and fonts may not load in this tool. Use common fonts and avoid images that depend on another website.

Can I convert a website URL to PDF?

Not directly, because browsers block reading other websites. Open the page and use your browser's Print, then Save as PDF.

Related tools

All pdf tools →