Free online toolNo sign-up

Free HTML to PDF Converter

Convert HTML to PDF with our free online HTML to PDF converter. Paste your HTML below, choose the page settings and click Convert to PDF: your HTML is exported to a PDF document in seconds.

Ready. The PDF downloads when the conversion finishes.

How to convert HTML to PDF

Three steps, in your browser. Nothing to install.

  1. Step 1

    Paste your HTML

    Type or paste your HTML code in the box above: a full page or a fragment, with inline CSS if you like.

  2. Step 2

    Click Convert to PDF

    The HTML is rendered by the ExpertPdf HtmlToPdf engine, with CSS, images and JavaScript, in the page size and orientation you choose.

  3. Step 3

    Download the PDF

    The PDF document downloads as soon as it is ready, with selectable text and page numbers in the footer.

Why is it free?

The free HTML to PDF converter is based on our product, the ExpertPdf HtmlToPdf Converter for .NET. It costs us nothing to run this service, and it shows what the library does. Try the library if you want this feature inside your own .NET applications.

Need to convert a URL to PDF?

To convert a web page directly, without pasting its HTML, use our free web page to PDF converter. Enter the address of the page and choose the page size, orientation and conversion delay.

The same conversion in your .NET code

The online tool runs on the ExpertPdf HtmlToPdf library. In C# or VB.NET, one call turns an HTML string into PDF bytes.

HtmlToPdf.cs · C#
using ExpertPdf.HtmlToPdf;

var converter = new PdfConverter();
converter.PdfDocumentOptions.PdfPageSize = PdfPageSize.A4;

// Convert an HTML string; the base URL resolves relative CSS and image paths
byte[] pdf = converter.GetPdfBytesFromHtmlString(html, "https://www.example.com/");

File.WriteAllBytes("document.pdf", pdf);

HTML to PDF converter questions

Is the HTML to PDF converter really free?
Yes. The online converter is free and needs no registration: paste your HTML code, click Convert to PDF and the PDF downloads straight away.
What HTML can I convert?
Any HTML script: a full page with <html>, <head> and <style>, or just a fragment. CSS styles and images referenced with full https:// addresses are loaded during the conversion.
Is my HTML code stored?
No. The HTML you paste is converted and the PDF is sent back to your browser. The code itself is not saved.
Can I convert a web page instead of HTML code?
Yes. Use the free URL to PDF converter to convert any web page from its address, with options for page size, orientation and conversion delay.
Can I convert HTML to PDF in my own .NET application?
Yes. The online converter runs on the ExpertPdf HtmlToPdf Converter, a library for .NET Framework, .NET Core and .NET 5 to .NET 11. Call GetPdfBytesFromHtmlString from C# or VB.NET to get the same result in your code.

Convert HTML to PDF in your own application

Download the free evaluation of the ExpertPdf HtmlToPdf Converter, with C# and VB.NET samples for ASP.NET, ASP.NET MVC and Windows Forms.

Targets.NET Framework · .NET Core · .NET 5 to 11
Versionv22.0.0