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, tables and allowed inline styling can appear in the sanitized preview. Scripts and unsafe embeds are removed, and unsupported styles can disappear. Prefer self-contained HTML with embedded image data; allowed external image or CSS references may cause browser requests, so remove them before previewing confidential content.
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 simple inline styles and embedded image data. Remove external resource references before previewing private content.
- 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. Sanitization can remove unsupported markup or styles, and external resources depend on browser and cross-origin rules. Use self-contained HTML and check the actual preview.
- What limits very long documents?
- The browser must capture the complete preview to one canvas, so canvas dimensions and device memory set practical limits.
- Does local processing mean there are no network requests?
- The conversion runs locally and does not fetch a website URL for you. Allowed external resource references in pasted markup can still make the browser request those resources; use embedded images and remove external references for confidential snippets.
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
