Guide
Saving HTML as a clean, readable PDF
“HTML to PDF” means two different things. Sometimes you want a pixel-perfect copy of a web page, with its layout, colors and fonts. Sometimes you have HTML (an email, an export from a system, a page you wrote) and want a tidy document with the same text, headings and tables. This tool does the second, and does it without uploading anything. For the first, your browser’s own print function is the better tool, and this guide explains both.
What this converter does
It reads the structure of your HTML: headings, paragraphs, bold and italic text, lists, tables and links. It then lays out a new document on A4 or Letter pages with clean, consistent styling and real text you can select and search. Simple inline styles, such as a red text color or centred alignment, are kept where possible.
Because the layout is rebuilt, the PDF looks like a document, not like a website: no navigation bars, no cookie banners, no sidebars, and page breaks that don’t slice text in half.
What is removed, and why
Before anything is shown or converted, the HTML is cleaned:
- scripts and inline event handlers, so pasted code cannot run,
- stylesheets,
<style>blocks and linked CSS, - forms, buttons and inputs,
- frames, embeds, video, audio, SVG and MathML,
- images that point to web addresses, including email tracking pixels.
PNG and JPEG images embedded as data URLs stay. A warning tells you how many images were left out.
When your browser’s “Save as PDF” is better
If the page relies on CSS for its look (multi-column layouts, cards, custom fonts, background colors) open it in Chrome, Edge, Firefox or Safari and choose Print → Save as PDF. That keeps the rendered design. Use this converter when you have HTML source rather than a live page, when you want the content without the website around it, or when the HTML comes from an email you would rather not open in a browser.
Typical sources of HTML
- HTML emails: “view source” or save the message as .html, then convert it for your records.
- System exports: reports from accounting, HR or monitoring tools that export HTML.
- Hand-written pages and templates: documentation, letters or invoices written in HTML.
- Rich text copied from a CMS: paste the HTML from the editor’s source view.
Options
Choose A4 or Letter, and landscape for wide tables. The text size and margins work as in a word processor. Page numbers appear at the bottom centre, and Contents page lists every h1 to h3 heading with its page number, which is useful for long exported reports.
A worked example: an exported report
- Open the
.htmlfile exported from a reporting tool. - The preview shows the headings and tables; a warning says the company logo (a linked image) will be left out.
- Choose landscape, narrow margins and page numbers, and create the PDF.
Related conversions
Writing the content yourself? Markdown to PDF is quicker to type. For plain text with exact line breaks, use Text to PDF. To go from a PDF back to HTML for a website, see PDF to HTML.
Checked against the current version of the HTML to PDF on .

