HTML to PDF

Get the readable content of a saved web page or HTML export into a tidy PDF.

or drop them here · files stay on your device
We count formats and sizes. Filenames stay private unless you opt in.

Page size
Processed on this device
  • Runs on your device
  • No sign-up or watermark
  • No fixed file size cap

The short answer

To convert an HTML file to PDF without uploading, open the .html or .htm file here, pick A4 or US Letter and press Convert. The browser's own parser reads its headings, paragraphs, lists, quotes and code, and pdf-lib typesets them into a PDF on your device. CSS and images are not applied, and it takes files, not URLs.

How to convert an HTML file to PDF offline

  1. STEP 1

    Choose your HTML files

    Pick one or more .html or .htm files saved on your device. Web addresses cannot be fetched.

  2. STEP 2

    Pick a page size

    Choose A4 or US Letter in the Page size menu.

  3. STEP 3

    Press Convert to PDF

    Each file is parsed and typeset in your browser, and the report counts the documents converted.

  4. STEP 4

    Download the PDF

    One PDF per HTML file, or a ZIP when you converted several.

Content versus design in an HTML page

An HTML file holds a page's content and structure: headings, paragraphs, lists and links. How it looks comes from CSS, often loaded from other files or servers, along with images and scripts. Saving a page as a single .html file frequently loses some of those pieces.

If you need the page to look exactly as it does in your browser, your browser's own Print, Save as PDF is the most faithful option. If you want a clean reading copy without menus, adverts and cookie banners, typesetting just the content often gives a better document.

What survives, and what does not

The HTML is parsed with DOMParser, and scripts, styles and noscript blocks are removed. The tool then walks the page and picks up h1 to h6, p, li, blockquote, pre and code, and hr elements, ignoring everything else. Those blocks are typeset in Helvetica and Courier with real word wrapping, and the PDF is titled after the file.

What you keep

Headings (h4 to h6 are set at the h3 size)

Paragraphs, list items and block quotes

Preformatted code, in a monospaced font

Selectable, searchable text

What you lose

All CSS, so colours, layout and web fonts are gone

Images and embedded media

Table cells and other text not inside a paragraph, list or heading

Link addresses: only the link text is kept

Characters outside Western European Latin

Honest limits are published on every tool page. If a tool cannot do something well, it says so here rather than letting you find out after the download.

HTML to PDF at a glance

InputHTML, HTM files
OutputPDF, A4 or US Letter
URLsNot supported; save the page first
BatchYes
EngineBrowser DOMParser, pdf-lib
Runs onYour device, in the browser

If something goes wrong

Parts of the page are missing

Only text inside headings, paragraphs, lists, quotes and code is collected. Text placed directly in div or table cells is skipped. Use your browser's Print, Save as PDF for those pages.

I want to convert a web address

Open the page in your browser and save it with File, Save Page As, choosing a single HTML file, then convert that file here.

HTML to PDF questions

How do I convert an HTML file to PDF offline?

Open this page once, then pick your saved .html file and press Convert to PDF. Everything runs in the browser, and after the first visit the page keeps working with the network off.

Can I convert a URL to PDF here?

No. The tool works on HTML files on your device and never fetches anything from the web. Save the page as HTML first, or use your browser's Print, Save as PDF for a live page.

Does HTML to PDF keep the CSS styling?

No. Stylesheets are removed and the content is typeset in one consistent house style. The result reads like a clean document rather than a copy of the web design.

Why not just use Print to PDF in my browser?

Print to PDF is the better choice when you want the page exactly as designed. This tool is for a clean text version without navigation, sidebars and adverts, and for converting several saved files in one go.

Is my HTML file uploaded?

No. It is parsed by your browser's built-in HTML parser and the PDF is written in the same tab, so exported emails and internal pages stay on your device.

One of 153 file tools and planned additions. Built and tested by Arin Prajapati, last checked against the code on . canonical: https://damnfiles.com/html-to-pdf
Analytics preferences

Help us understand which tools and file types people use. File contents always stay on your device.

Filename sharing is optional and off by default. Names can contain personal information. Changes apply to future events; disabling sharing does not delete earlier records.

Read our privacy policy