HTML to PDF Converter

Paste HTML or drop an .html file, get a paginated A4 PDF. Renders with your browser's own engine via jsPDF + html2canvas, so what you see in your browser is what shows up in the PDF.

Why convert HTML to PDF?

How it works

Your HTML is rendered into a hidden, fixed-width container in this page (760px wide, default font and color reset to print-friendly defaults). jsPDF's html() method then walks the rendered DOM and rasterizes each section into PDF pages using html2canvas, paginating automatically across A4 pages with a 40pt margin. The result is downloaded directly. Because rendering uses your browser, the PDF reflects how *your* browser draws the HTML — fonts, colors, images, and layout match what you'd see if you opened the HTML directly. External resources (CSS files, images via remote URLs, web fonts) are followed only if the remote server permits it via CORS; for fully self-contained output, inline CSS and embed images as data URIs.

Frequently asked questions

Will the text in the PDF be selectable?

Partially. jsPDF.html() with autoPaging='text' produces a mix of vector text where possible and rasterized images for complex layout sections. Headings and body text typically stay selectable; columns, tables, and absolutely-positioned regions may be rasterized. For fully selectable text, use a desktop tool like wkhtmltopdf or Chrome's 'Save as PDF'.

Why does my external image not appear?

html2canvas can only rasterize images the browser is willing to load with CORS — many image hosts don't send CORS headers, which breaks the rasterizer. For reliable inclusion, embed images as data URIs in the HTML, or use images from a CORS-friendly host.

Can I control the page size or margins?

Not yet from this UI — defaults are A4 with 40pt margins, which works for most documents. Custom page sizes and margins are on the roadmap. For tight control today, save the HTML and use Chrome's 'Print > Save as PDF' dialog instead.

Will JavaScript in my HTML run?

It runs in the off-screen render container, but timing is tricky — the rasterizer captures a single moment, so async-loaded content (fetched images, dynamic charts) may not be ready in time. Pre-render dynamic content into the HTML before passing it through, or wait for content to settle before clicking Convert.

Are my files uploaded?

No. Rendering and PDF generation both happen in your browser via jsPDF and html2canvas. Your HTML — and any sensitive data inside it — stays on your device.

About this tool

HTML→PDF is the bridge between web-native content and document-native distribution. The web is great for reading; PDF is great for printing, signing, and emailing. The conversion lives in this awkward middle — HTML is reflowable, PDF is fixed; HTML can pull resources at render time, PDF is sealed at save time. The cleanest desktop answer is Chrome's 'Save as PDF' (uses the browser's print engine for full vector text). The cleanest server-side answer is wkhtmltopdf or headless Chrome. The cleanest client-side answer is jsPDF + html2canvas — partial vector, mostly raster, but no upload step, which is the right trade for one-off conversions of HTML that contains data you'd rather not send to a third-party site.