HTML to PDF

The HTML to PDF Converter turns any HTML — pasted markup, an .html file, or a public URL — into a downloadable PDF. Pick A4 or Letter, portrait or landscape, and a margin. The page is rendered into an off-screen canvas with html2canvas, tiled into PDF pages by jsPDF, and handed back to you as a single file. Runs entirely in your browser; nothing uploads. Be honest about the limits: html2canvas re-implements a subset of CSS, so flexbox edge cases, grid, and custom properties may render imperfectly. For pixel-perfect output use your browser's Print → Save as PDF instead. URL mode is best-effort — most public sites block cross-origin fetches (CORS), so 'Paste HTML' is the reliable path for those.

How are you sending the HTML?
⚠ Heads up — read this first
Complex modern CSS (flexbox edge cases, grid, custom properties, container queries) may render imperfectly. For pixel-perfect web → PDF, use the browser's built-in Print → Save as PDF. This tool is for quick conversions where round-trip-perfect isn't required.

🔒 Everything happens in your browser. Nothing uploads. Close the tab and it's gone.

How to use

  1. 1

    Pick a mode. Paste HTML works for any markup you already have. Upload .html accepts a local file. From URL fetches a public page (most will fail CORS — see the FAQ).

  2. 2

    Set page size (A4 or Letter), orientation (portrait or landscape), and margin (0, 10, 20, or 40 mm). Defaults are A4 / portrait / 20 mm.

  3. 3

    Click Convert to PDF. The HTML is rendered into a hidden div, html2canvas captures it at 2× scale, and jsPDF tiles the result across as many pages as needed.

  4. 4

    Click Download. Output filename is derived from the source: pasted HTML → webpage.pdf, uploaded file → mirrors the filename, URL → derived from the hostname (example.com → example-com.pdf).

Frequently asked questions

Ratings & Reviews

Rate this tool

Sign in to rate and review this tool.

Loading reviews…