Skip to content
ToolsOnDuty - free online tools
PDF Tools

HTML to PDF

Convert HTML into a downloadable PDF with a live preview.

Free browser toolRuns in your browserNo sign-up

HTML document studio

Design and preview an HTML PDF

Write sanitized HTML, keep the rendered document visible while editing and create a private A4 PDF in the browser.

412

characters

A4

page format

Sanitized

live preview

Live document preview

Invoice

Dear customer, thank you for your order.

ItemPrice
Widget$19.00

Private workspace. Files stay in this browser tab and are never uploaded to ToolsOnDuty.

External scripts do not run. Long content is split across A4 pages.

About the HTML to PDF

HTML to PDF renders pasted markup in a sanitized live preview and captures that preview into portrait A4 pages. It is intended for self-contained snippets such as invoices, notices, tables, and simple reports rather than fetching a public web address.

Basic markup, inline styling, and safe style elements can appear in the preview. Scripts, event handlers, iframes, object embeds, and other unsafe elements are removed, so interactive applications and script-generated content are not reproduced.

The rendered preview is captured as a PNG image and sliced across PDF pages. The result is rasterized: text is not selectable, semantic links are not retained, and awkward page breaks can occur through tall elements.

Key features

  • Editable HTML source area
  • Sanitized live document preview
  • Portrait A4 multi-page output
  • Basic inline styles and tables
  • Script and unsafe embed removal
  • Local canvas rendering and PDF creation
  • No remote-URL fetching

How to use

  1. 1Paste or write self-contained HTML in the source editor.
  2. 2Use inline styles or safe embedded styles for required formatting.
  3. 3Review the sanitized preview and confirm that unsupported content was not removed unexpectedly.
  4. 4Keep very tall unbreakable elements out of likely page boundaries.
  5. 5Convert to PDF and inspect the downloaded A4 pages.

Examples

Create a simple invoice
Input: HTML with heading, address, item table, and total
Output: Rasterized multi-page A4 PDF

Review table rows near page boundaries before sharing.

Frequently asked questions

Can it convert a website URL?
No. It converts pasted HTML and does not fetch remote web pages.
Do scripts run?
No. Scripts, event handlers, iframes, and unsafe embeds are removed from the preview.
Is the PDF text selectable?
No. The rendered preview is captured as an image and placed on PDF pages.
Are external styles guaranteed to load?
No. Use self-contained markup and inline or embedded basic CSS for predictable output.
What limits very long documents?
The browser must capture the complete preview to one canvas, so canvas dimensions and device memory set practical limits.

Open a related tool to prepare your files or refine the finished result.