HTML → PDF
Paste a snippet of HTML or drop one or more .html files and the tool rasterises each into a printable PDF using html2canvas + jsPDF.
Drop .html files here for batch conversion
One PDF output per .html file
When to use this tool
Convert HTML you have to a PDF — pasted snippet, an exported article, an HTML invoice, a printable receipt. The output is a rasterised PDF (text isn't selectable) but it's visual-fidelity to how the HTML renders in a browser. Good for "I want a printable copy of this page."
Step by step
- Paste HTML into the textarea, or drop one or more
.htmlfiles into the drop zone for batch conversion. - Pick page size and orientation. A4 portrait is a good default for most documents.
- Set margin (default 20 pt). Set to 0 for full-bleed conversion.
- Click "Render & download". Pasted HTML produces
document.pdf; dropped files keep their original stems.
Common use cases
- Receipts and invoices. Save the HTML of an order confirmation page as a PDF for your records.
- Article archive. "Print to PDF" replacement for article pages where browser print mishandles layout.
- Static site export. Convert a folder of
.htmlfiles into matching PDFs for a print edition. - Templated reports. Build the report as HTML (easier than PDF), then export as PDF for distribution.
- Email-friendly version. Some HTML doesn't render in email; a PDF attachment is universal.
Common mistakes
- External images don't appear. CORS protection blocks html2canvas from rasterising images served from third-party origins. Embed images as
data:URIs, or host them on a CORS-permissive server. - Expecting selectable text. The output is rasterised. Each PDF page is essentially a screenshot of the rendered HTML. For real text, you need a server-side renderer (Puppeteer, wkhtmltopdf).
- Pasting JavaScript-driven HTML. Scripts in the pasted HTML are not executed. Static markup only.
- Using @media print rules. html2canvas renders the screen view, not the print view. CSS print rules don't apply.
FAQ
Why is the text in the PDF not selectable?
Because the conversion goes HTML → bitmap → PDF (image). True HTML→PDF that preserves text requires a real headless browser (Puppeteer / wkhtmltopdf), which doesn't run in a browser tab. We accept the trade-off for the "no server" guarantee.
Can I convert a URL directly?
Not yet — paste the page's HTML or save the page as a .html file and drop it. URL fetching would need to bypass CORS, which would require a backend.
Does it handle long content?
Yes — the rendered bitmap is split across multiple PDF pages. Very long content (1000s of pixels tall) takes longer to render and produces a larger file.
What fonts does it use?
Whatever fonts your browser has loaded for the rendered HTML. If the HTML references a Google Font, html2canvas captures it as part of the rendered bitmap.
Why are emojis missing or broken?
Emoji rendering in html2canvas can be flaky — it depends on the system font. As a workaround, swap emojis for inline SVG or Twemoji-style images.