Best .NET Converter · v26.3 22M+ NuGet downloads · since 2014

The Best HTML to PDF Converter for .NET.
Built for ASP.NET, C# and VB.NET.

SelectPdf is the best HTML to PDF converter for .NET — browser-grade rendering with no external dependencies, a three-line API, and ready-made ASP.NET MVC, Web Forms and WinForms samples in C# and VB.NET. It is the commercial SelectPdf library: a perpetual per-developer license, royalty-free OEM options, and a free, no-limit trial — every page watermarked — to evaluate it before buying.

COMMERCIAL · SELF-HOSTED

Add it to your .NET project

One NuGet package. No third-party software to install.

# commercial library (HTML to PDF + full toolkit):
$ dotnet add package Select.Pdf
 
# free Community Edition — HTML to PDF converter only:
$ dotnet add package Select.HtmlToPdf
ASP.NET & MVC C# & VB.NET No dependencies
WHY THE BEST

Why it's the best .NET HTML to PDF converter.

What developers pick SelectPdf for when they need HTML to PDF inside a .NET application.

01 · Fidelity+
Browser-grade output

Pages render the way they look in a browser.

  • Full HTML5, CSS3 and web fonts
  • Powerful JavaScript engine
  • @media types screen & print
02 · Zero setup+
No dependencies

One NuGet package, nothing else to install.

  • No external dependencies
  • No COM, GAC, Adobe or Office
  • Native engine bundled in the package
03 · ASP.NET+
Built for ASP.NET

Drop it into the .NET app you already have.

  • ASP.NET MVC, Razor Pages, Blazor
  • ASP.NET Web Forms, WinForms, console
  • Return a PDF straight from an action
04 · Simple API+
Three-line API

Create, convert, save — that is the whole thing.

  • ConvertUrl or ConvertHtmlString
  • C# and VB.NET
  • Easy to learn, hard to misuse
05 · Chrome+
Headers & footers

Customisable running chrome on every page.

  • Custom HTML headers and footers
  • Different per page if needed
  • Automatic page numbering
06 · Standards+
Accessible & archival

Standards-compliant, archival output.

  • Tagged PDF / PDF/UA-1, PDF/A-3
  • PDF/A & PDF/X standards
  • Security: passwords & permissions
07 · In-process+
Runs in your app

No sidecar service to host or scale.

  • In-process on Windows (x86 & x64)
  • Azure Web Apps fully supported
  • No network round-trip
08 · Licensing+
Perpetual & royalty-free

Buy once — royalty-free OEM options for unlimited deployments.

  • Perpetual, per-developer license
  • Royalty-free OEM options
  • Free, watermarked trial first
09 · Portable+
Same engine, two shapes

Identical output as the cloud API.

  • Same engine as the Online API
  • Switch shape without changing output
  • Free Community Edition to start
§Quickstart · ASP.NET

Convert HTML to PDF in ASP.NET.

An MVC action, a Razor Page handler, or a Blazor button — pick your shape. Same engine, same one-line conversion call.

PdfController.cs
using System.Web.Mvc;
using SelectPdf;

public class PdfController : Controller
{
    public ActionResult Export()
    {
        // instantiate the HTML to PDF converter
        HtmlToPdf converter = new HtmlToPdf();
        converter.Options.PdfPageSize = PdfPageSize.A4;

        // convert a URL (e.g. another action) to PDF
        PdfDocument doc = converter.ConvertUrl(
            Url.Action("Invoice", "Orders", null, Request.Url.Scheme));

        byte[] pdf = doc.Save();
        doc.Close();

        return File(pdf, "application/pdf", "invoice.pdf");
    }
}
PdfController.vb
Imports System.Web.Mvc
Imports SelectPdf

Public Class PdfController
    Inherits Controller

    Public Function [Export]() As ActionResult
        ' instantiate the HTML to PDF converter
        Dim converter As New HtmlToPdf()
        converter.Options.PdfPageSize = PdfPageSize.A4

        ' convert a URL (e.g. another action) to PDF
        Dim doc As PdfDocument = converter.ConvertUrl(
            Url.Action("Invoice", "Orders", Nothing, Request.Url.Scheme))

        Dim pdf As Byte() = doc.Save()
        doc.Close()

        Return File(pdf, "application/pdf", "invoice.pdf")
    End Function
End Class
Pages/Export.cshtml.cs
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using SelectPdf;

public class ExportModel : PageModel
{
    [BindProperty]
    public string SourceUrl { get; set; } = "https://selectpdf.com";

    public IActionResult OnPost()
    {
        // instantiate the HTML to PDF converter
        HtmlToPdf converter = new HtmlToPdf();
        converter.Options.PdfPageSize = PdfPageSize.A4;

        // convert a URL to PDF
        PdfDocument doc = converter.ConvertUrl(SourceUrl);

        byte[] pdf = doc.Save();
        doc.Close();

        // stream the PDF straight back to the browser
        return File(pdf, "application/pdf", "invoice.pdf");
    }
}
Pages/Export.razor
@page "/export"
@inject IJSRuntime JS
@using SelectPdf

<button class="btn btn-primary" @onclick="OnExport">Download PDF</button>

@code {
    private async Task OnExport()
    {
        // instantiate the HTML to PDF converter
        HtmlToPdf converter = new HtmlToPdf();
        converter.Options.PdfPageSize = PdfPageSize.A4;

        // convert a URL to PDF
        PdfDocument doc = converter.ConvertUrl("https://selectpdf.com");

        byte[] pdf = doc.Save();
        doc.Close();

        // stream the bytes to the browser via JS interop
        await JS.InvokeVoidAsync("selectpdfDownload",
            "invoice.pdf", "application/pdf",
            Convert.ToBase64String(pdf));
    }
}
Invoice PDF produced by the SelectPdf HTML to PDF converter for .NET
Real PDF — generated from HTML by SelectPdf
SAMPLES & SUPPORT

Best samples and support.

The free trial ships ready-to-run samples in C# and VB.NET for Windows Forms, ASP.NET, ASP.NET MVC, Razor Pages and Blazor on .NET 10 — plus full online documentation and human support. Need the complete option list instead? See the HTML to PDF converter reference.

THE REST OF THE RANGE

Every option, the full toolkit, or a REST API?

This page is the short answer to "which .NET HTML to PDF converter?". For the exhaustive conversion-option reference see the HTML to PDF converter for .NET; for merge, split, sign and PDF forms see the full PDF library for .NET; for Linux, macOS or a non-.NET stack use the HTML to PDF API.

LIVE DEMO · NO KEY REQUIRED

See the best converter in action.

Drop a URL into the live demo and get back a real, watermarked PDF from this very engine — no key, no signup.

?FAQ

The best .NET converter, answered.

Full API reference and runnable C# / VB.NET samples ship in the docs — or just ask the team.

SelectPdf renders pages with a real browser engine for pixel-faithful output, ships with no external dependencies, installs from a single NuGet package, and has a tiny API — and it is backed by a perpetual, royalty-free commercial license with a free trial.
Yes. The converter runs in any .NET app — ASP.NET MVC, Razor Pages and Blazor on .NET 10, plus ASP.NET Web Forms, Windows Forms and console apps — from C# or VB.NET. An MVC action or a Razor Page OnPost handler can return the generated PDF as a FileResult; a Blazor button can stream the bytes to the browser via a small JS-interop helper.
The free trial includes ready-to-use samples coded in C# and VB.NET for Windows Forms, ASP.NET, ASP.NET MVC, Razor Pages and Blazor on .NET 10, plus older targets (.NET 9, .NET 8, .NET Core 3.1 / 2.1, classic ASP.NET MVC) and online documentation.
Yes. Converting HTML to PDF is three lines: create an HtmlToPdf converter, call ConvertUrl or ConvertHtmlString, then save the PdfDocument. No COM, no GAC install, no Adobe runtime and no Office automation.
No. The Select.Pdf and Select.HtmlToPdf NuGet packages bundle the native rendering engine — there are no external dependencies and no third-party software to install.
It supports .NET Framework 2.0+ / 4.0+, .NET Core, and .NET 5 through .NET 10, and ships four engines — WebKit, WebKit Restricted, Blink and Chromium. WebKit, WebKit Restricted and Chromium run from .NET Framework 2.0 onward; Blink requires .NET Framework 4.6.1 or later.
Yes. The .NET converter and the SelectPdf Online API share the same rendering engine and produce the same output — run the library on-premise on Windows (in-process inside your .NET app), or call the REST API from any language or OS.
Yes. The .NET library trial is the full commercial converter with no feature or page limits — it only stamps a watermark on every page. A separate free Community Edition is also available, capped at five pages per PDF. Commercial licensing is perpetual and starts at $499.