PDFJadoo › Convert › HTML to PDF
The PDFJadoo genie with his golden lamp, rising in a swirl of gold magic

HTML to PDF, faithfully rendered

Paste HTML or drop an .html file, and the genie renders it — styles, images and all — into a clean multi-page PDF.

Runs 100% in your browserFiles never uploadFree · no sign-up
Drop an .html file on the lamp

Or skip the file and paste HTML into the box below — either way works.

Page size

🔒 Private by design: this tool runs entirely in your browser. Your file is never uploaded, never stored, and works even with the internet off.

How to convert HTML to a PDF online

  1. Drop an .html file onto the lamp, or paste HTML into the box.
  2. Choose A4 or Letter.
  3. Press “Convert to PDF” — long content flows across pages automatically.

Your HTML is rendered in a hidden frame exactly as a browser would draw it, then printed to PDF page by page. Images referenced by absolute URLs load normally; local relative images can't travel with a pasted snippet, so embed or link them if you paste.

Related wishes

Or browse the full deck of 130 free PDF tools.

HTML to PDF — fair questions

Can I convert a live website by URL?

Not directly — browsers won't let one site read another's page. Save the page (Ctrl+S) and drop the .html file here instead.

Do styles and images survive?

Styles in the HTML, yes. Images need absolute URLs (https://…) when you paste; dropped files render as saved.

Why does the PDF break pages mid-paragraph?

Content taller than a page is sliced at page boundaries like a print-out. Shorter sections paginate cleanly.

Is my HTML uploaded?

No — rendering happens entirely in your browser.

Back to All Tools
"; PJ.setStatus("Rendering your HTML…"); const iframe=document.createElement("iframe"); iframe.style.cssText="position:fixed;left:-10000px;top:0;width:820px;height:1200px;border:0;background:#fff"; document.body.appendChild(iframe); const idoc=iframe.contentDocument;idoc.open();idoc.write(htmlStr);idoc.close(); await new Promise(r=>setTimeout(r,600)); if(idoc.images&&idoc.images.length){await Promise.race([Promise.all(Array.from(idoc.images).map(im=>im.complete?Promise.resolve():new Promise(r2=>{im.onload=im.onerror=r2}))),new Promise(r=>setTimeout(r,2500))])} const bodyEl=idoc.body;if(!bodyEl)throw new Error("That HTML has no body content to render."); const canvas=await html2canvas(bodyEl,{scale:2,backgroundColor:"#ffffff",logging:false}); iframe.remove(); const fmt=document.querySelector('input[name="fmt"]:checked').value; const{jsPDF}=window.jspdf;const pdf=new jsPDF({unit:"mm",format:fmt,orientation:"portrait"}); const pw=pdf.internal.pageSize.getWidth(),ph=pdf.internal.pageSize.getHeight(); const imgH=(canvas.height*pw)/canvas.width;const url=canvas.toDataURL("image/jpeg",0.92); let left=imgH,pos=0,pages=0; pdf.addImage(url,"JPEG",0,0,pw,imgH);pages++;left-=ph; while(left>0){pos-=ph;pdf.addPage();pdf.addImage(url,"JPEG",0,pos,pw,imgH);pages++;left-=ph} const blob=pdf.output("blob");PJ.setStatus("Done — rendered into a "+pages+"-page PDF."); PJ.showDownload(blob,"webpage.pdf","⬇ Download webpage.pdf"); }catch(e){PJ.setStatus("Something went wrong: "+e.message,true)} btn.disabled=false; });