HTML to PDF

A free tool that converts HTML source code, or text typed in a simple editor, into a PDF you can download. Choose paper size, orientation, and margins. All processing happens in your browser, so your data is never uploaded to any server.

Last updated: 2026/10/16 Documents Feedback & bug reports
Your data is never uploaded All processing happens locally in your browser. No upload, unlimited use, and no sign-up required.

For your safety, dangerous code such as <script> is automatically removed from the preview.

Preview
Orientation
Your preview will appear here
.pdf

How to Use

1

Enter HTML or text

Paste HTML into the "HTML source" tab, or write content using the toolbar in the "Simple editor" tab. The preview updates as you type.

2

Choose paper, orientation & margin

Select the paper size (A4, A3, B5, Letter), portrait or landscape orientation, and margin width. The preview adapts to your selection.

3

Convert & download

Enter a file name, press "Convert to PDF", and the preview is turned into a PDF. Download the result when finished.

About the HTML to PDF Tool

An online tool that converts HTML source code, or content created in a simple editor, straight into a PDF in your browser. It is handy for quickly producing documents such as invoices, quotations, reports, and notices as PDF files. The biggest advantage is that your data is never sent to a server. Typical online converters require uploading your data, but this tool runs html2canvas and jsPDF entirely in your browser, so you can convert even confidential content safely, with unlimited use, no sign-up, and completely free.

Features

  • Browser-Only ProcessingYour input is never uploaded; everything runs on your device. Safe even for confidential documents.
  • Real-time PreviewSee a preview that matches your chosen paper size and orientation as you type.
  • Paper Size & OrientationChoose A4, A3, B5, or Letter, portrait or landscape, and margins before converting.
  • No Sign-up, 100% FreeNo registration or installation needed. Just open your browser and go.

Use Cases

  • Create invoices, quotes, and receipts as PDF
  • Save HTML emails or templates as PDF
  • Export reports, minutes, and notices to PDF
  • Paste part of a web page as HTML and convert it
  • Distribute content written in the simple editor as PDF

FAQ

Is my HTML or data uploaded to a server?
No. All processing happens locally in your browser. Your input and the generated PDF are never sent to or stored on any server, so even confidential documents are safe.
Can I convert HTML with images and tables?
Yes. HTML with &lt;img&gt; and &lt;table&gt; is supported. Images render if they are same-origin, served from a CORS-enabled public URL, or embedded as a data URI (base64). External images that cannot be loaded may appear blank.
Will long content become a multi-page PDF?
Yes. When the preview does not fit on a single page, the PDF is automatically split into multiple pages based on the content height.
Can I select and copy text inside the PDF?
This tool renders the preview as an image embedded in the PDF, which preserves layout faithfully but means the text is not selectable or searchable. If you need selectable text, consider your browser's "Print to PDF" feature instead.
Will scripts or dangerous code be executed?
No. Before rendering the preview, the HTML is sanitized with DOMPurify, which automatically removes dangerous code such as &lt;script&gt; and event handlers, so previewing and converting is safe.