Skip to content
Web & Code

HTML to PDF converter

Turn an .html file or a saved web page into a PDF with selectable text, clickable links and bookmarks — laid out by your browser, cut into pages that never split a line, a picture or a table row. The HTML runs no scripts and contacts nothing, and it is never uploaded.

Settings appear once you add an HTML file.

Layout

The clean layout keeps the article — headings, text, lists, tables, pictures — and drops menus, sidebars and the page’s own styling.

Advanced 4
Shrink wide content to fit the page Otherwise anything wider than the page, like a big table, is cut off at the edge.
Orientation

Done on your device No upload, no queue, no sign-up.

Bytes sent anywhere: 0 B

How to convert HTML to PDF

Your HTML file goes into this browser tab, is laid out page by page on your device, and comes back as a PDF. 0 bytes uploaded
  1. Add your HTML files

    Drop an .html file. For a web page, save it from your browser first with Ctrl+S (⌘S on a Mac), then drop the saved file.

  2. Check the settings

    Keep the page as designed, or switch to the clean reading layout for an article without menus and sidebars. Page size and margins are under Advanced.

  3. Save the result

    Save the PDF. Text stays text, links still work, and headings become bookmarks.

Why it doesn’t upload

HTML files are often exports of private things — an email, an invoice from an online shop, an intranet page, a report generated by a system at work. Uploading one to convert it hands all of that to a stranger. Here the page is laid out and written as a PDF inside your own browser, in a sealed frame that can’t run its scripts or send anything anywhere.

Check it in your browser’s Network tab

Worth knowing

  • Only what is inside the .html file is used. Pictures and style sheets that live on the web or in a separate folder are not loaded, because converting never contacts another server; pictures embedded in the file are kept.
  • Scripts never run, so pages that build their content with JavaScript (many modern web apps) come out with whatever was in the HTML when it was saved.
  • Web fonts are replaced with the Noto family, so text looks close to the original but not identical.
  • This works from a file, not a web address: save the page in your browser first.
  • Chinese, Japanese and Korean text is not supported by the embedded fonts yet.

Under the hood

What happens to your file

The HTML is loaded into a sandboxed frame with scripts off and a Content-Security-Policy that blocks every network request. Your browser lays it out at the page’s width; each word, box and picture is measured where it landed, cut into pages between lines and table rows, and painted with pdf-lib as real text, with the links kept.

Runs on pdf-libDOMPurify

Reference: pdf-lib documentation · ISO 32000-2 (PDF 2.0)

Questions

How do I save a web page as a PDF?

Save the page from your browser with Ctrl+S (⌘S on a Mac), choosing “Web Page, HTML Only” if asked, then drop the .html file here and press Convert to PDF. Unlike the print dialog, the result keeps clickable links and bookmarks, and never cuts a line or a table row in half.

Why is the PDF missing pictures or styling?

Those pictures or styles live outside the file — on the web or in the folder a browser saves next to it — and this tool deliberately contacts nothing. Try the Clean reading layout, which does not depend on the page’s own styles.

Is it safe to convert an HTML file I didn’t make?

Yes. The file is laid out in a sandboxed frame with scripts disabled and every network request blocked, so it can’t run code, track you or load anything from elsewhere.

Is the text in the PDF selectable?

Yes. Each word is drawn as real text in an embedded font, where the browser placed it. The PDF can be searched and copied from, and its links work.

Can I convert HTML email templates or invoices?

Yes — those are usually self-contained HTML with their styles inside, which is exactly what converts best. Leave the layout As designed.

More web & code tools

All web & code tools