Generated reports
Scripts and dashboards often export HTML. Turn that into a PDF to attach to an email or ticket.
report.htmlreport.pdfPaste HTML or open an .html file and turn it into a tidy, text-based PDF. Headings, paragraphs, lists, tables, code blocks, links and embedded images are kept; scripts never run and nothing is fetched from the web. Live website URLs are not supported.
Drag & drop an HTML file here
or paste HTML code
HTML, HTM
Overview
HTML to PDF turns HTML code into a PDF document. You can paste the code or open an .html file, check a safe preview, and download a PDF with real, selectable text. Headings, paragraphs, bold and italic text, bulleted and numbered lists, tables, code blocks, quotes, clickable links and embedded images are all carried over.
There is one thing this tool does not do. It does not take a live website address and capture the page. Doing that safely needs a sandboxed browser running on a server, plus protection against requests to private networks, and that is not available here. To convert a page you can see in your browser, save it as an HTML file first, or use the browser's own Print → Save as PDF.
How it works
Open an .html file, paste code, or start from the example.
The Page preview tab renders the HTML in a sandbox with scripts disabled and remote loading blocked.
Pick A4, Letter or Legal and a body text size, then convert. The PDF tab shows every page.
Save the PDF, or continue to Add Page Numbers or PDF Compressor.
Examples
| In the HTML | In the PDF |
|---|---|
<h1>–<h6> | Bold headings at decreasing sizes |
<p>, <b>, <i>, <u>, <sup> | Wrapped paragraphs with inline styles |
<ul>, <ol start="3">, nested lists | Bullets and numbers with indentation |
<table> with <th> | Bordered table; header row repeated on new pages |
<a href="https://…"> | Clickable link |
<img src="data:image/png;base64,…"> | Embedded image |
<img src="https://…"> | Skipped (nothing is downloaded) |
<script>, <iframe>, forms, CSS | Not used |
Safety
HTML from an unknown source can contain scripts, tracking pixels or embedded pages. The converter never executes the code. It reads the HTML as a document tree and keeps only the content elements. Scripts, iframes, forms, objects and event handlers are dropped.
The preview is a sandboxed frame with scripts, forms and pop-ups disabled. Its content security policy blocks every request except inline data: images. Converting a page therefore sends nothing anywhere, including to tracking pixels.
Use cases
Scripts and dashboards often export HTML. Turn that into a PDF to attach to an email or ticket.
report.htmlreport.pdfSave an article as "Webpage, HTML only", open it here and get a clean, ad-free reading copy.
Ctrl+Sarticle.pdfPaste HTML produced by a Markdown converter and get a printable handout.
Markdown → HTMLPDFTips
<h1>, <h2>) rather than large styled <div> text, so headings come through as headings.<th> cells so it repeats as a header when the table continues on the next page.Limitations
Web addresses cannot be converted. Save the page as HTML first, or use the browser's Print → Save as PDF for an exact visual copy.
The PDF uses a clean document style. Colours, custom fonts, columns, flexbox and grid layouts are not reproduced.
Only images embedded as data: URLs (PNG or JPEG) are included. Linked images are not fetched.
Text is set in Liberation Sans (Latin, Greek, Cyrillic) and code in Courier. HTML up to 5 MB is supported.
Privacy
The HTML is parsed and the PDF is created in your browser. Nothing is uploaded, and the preview cannot contact other sites.
Related tools
No. Converting live web addresses needs a secure server-side browser, which is not available here. Save the page as an .html file and open it in this tool, or use your browser's Print → Save as PDF.
CSS is not applied. The converter keeps the content and structure (headings, lists, tables, links, images) and lays it out in a clean document style, so colours, fonts and page layouts are not copied.
Yes. Scripts are never run, iframes and forms are dropped, and the preview is sandboxed with all network requests blocked, so the HTML cannot load trackers or contact other sites.
Only images embedded in the HTML as data: URLs are included. Images linked by web address are not downloaded, to keep the conversion offline and private.