HTML to PDF
Convert HTML into a downloadable PDF with a live preview.
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
Invoice
Dear customer, thank you for your order.
| Item | Price |
|---|---|
| Widget | $19.00 |
Private workspace. Files stay in this browser tab and are never uploaded to ToolsOnDuty.
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
- 1Paste or write self-contained HTML in the source editor.
- 2Use inline styles or safe embedded styles for required formatting.
- 3Review the sanitized preview and confirm that unsupported content was not removed unexpectedly.
- 4Keep very tall unbreakable elements out of likely page boundaries.
- 5Convert to PDF and inspect the downloaded A4 pages.
Examples
HTML with heading, address, item table, and totalRasterized multi-page A4 PDFReview 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.
Helpful guides
Continue your workflow
Open a related tool to prepare your files or refine the finished result.
- ConvertersMarkdown to HTML Converter
Convert Markdown to HTML and HTML back to Markdown.
Open tool - PDF ToolsImages to PDF
Convert JPG, PNG and other images into a single PDF, one image per page.
Open tool - PDF ToolsMerge PDF
Validate, unlock, preview, reorder and combine multiple PDF files into one polished document.
Open tool
