How to Convert HTML to PDF (Keep Links & Formatting) — 2026
Invoices, receipts, email templates, exported reports, saved web pages — all of it often starts life as HTML. Turning that into a clean, portable PDF (with the styling and links intact) is a common need, and it does not require any paid software.
How to convert an HTML file to PDF
- Open HTML to PDF.
- Upload your
.htmlfile. - OptaPDF renders the HTML and its CSS, paginates it, and produces a PDF.
- Download the result — ready to email, print, or archive.
Does HTML to PDF keep links and formatting?
Yes — a real conversion preserves your layout, fonts, colours, images, and clickable links. The key is that the tool must render the page the way a browser does, applying your CSS, rather than printing the raw HTML source. OptaPDF renders the styled page, so your PDF looks like the web page — headings, tables, and formatting included — not a screen full of code.
For the cleanest output, start from well-structured HTML: proper headings and paragraphs, tables for tabular data, and fonts, margins, and line-height defined in your CSS.
Converter vs. the browser Save as PDF option
You can open an HTML file in your browser, press Ctrl/Cmd+P, and choose "Save as PDF." That is perfectly fine for a one-off. But the browser applies print styles (which may differ from what you see), can clip wide tables, and offers little repeatable control. If you convert HTML regularly — batches of invoices or receipts, for instance — a dedicated HTML to PDF converter gives you consistent, predictable results every time.
After you convert
Generated PDFs from data-heavy HTML can be larger than expected. If yours is big, run it through Compress PDF before sending. Producing several PDFs — say one per invoice — and want them in a single document? Combine them with Merge PDF.
The takeaway
To convert HTML to PDF with links and formatting intact, use a tool that renders the page rather than the source. OptaPDF HTML to PDF does this for free — no watermark, no sign-up — and pairs naturally with Compress PDF and Merge PDF to finish the job.