My Tool Studio
PDF

HTML to PDF Converter

This HTML to PDF converter turns HTML code, an uploaded .html file, a saved website in a ZIP, or up to 20 web page addresses into PDFs. The page is laid out in your browser at the screen width you pick, from phone to desktop, then scaled onto A2, A3, A4, A5, Letter, Legal or one long page, in portrait or landscape, with no, small, normal or big margins. Page breaks are placed between lines of text rather than through them. Cookie bars and pop-ups can be removed, links stay clickable, and an invisible text layer keeps the PDF searchable. Page numbers and the address with the date can go in the margins. Print / Save as PDF uses your browser's print engine instead. Scripts never run, so pages built by JavaScript may come out incomplete.

Always freeNo sign upRuns in your browser

A full page or a fragment. Scripts are removed; styles in <style> tags are kept.

The page is laid out at this width, then scaled to fit the paper.

Convert to PDF draws the page as sharp images with an invisible text layer and working links. Print / Save as PDF uses your browser's print engine with the page's print styles, which keeps real text in any script; margins and page numbers are then set in the print dialog.

What this converter does not keep

  • JavaScript does not run, so content that a script loads after the page opens is missing.
  • Web fonts may be replaced by similar fonts in the download; the print route keeps them.
  • Pages behind a login, and sites that block automated fetching, cannot be converted from a URL.
  • Videos, iframes and embedded maps are left out.

How to use

01

Give it your HTML

Paste code (or press Load sample), upload one .html file or a .zip of a saved website, or type web page addresses, one per line. Addresses are fetched by our server and drawn in your browser.

02

Set the page

Choose the page size, orientation, margins and screen width. Tick Remove fixed cookie bars, background colours, page numbers, the address and date stamp, or the text layer.

03

Convert or print

Press Convert to PDF to download and preview the pages, or Print / Save as PDF to save through the browser's print dialog with the page's print styles.

Why HTML to PDF Converter

Convert to PDF compared with Print / Save as PDF

Both buttons use the same cleaned HTML. They differ in how the PDF is made.

Convert to PDFPrint / Save as PDF
TextPage images with an invisible search layerReal, selectable text
Screen widthAny, from 320 to 1920 pxThe print layout of the page
One long pageYesNo
Page numbers and stampDrawn in the marginsSet in the print dialog
Pictures from other sitesOnly when the site allows itUsually kept

How page breaks are chosen

Before drawing, the converter measures every line of text and every picture. Each page break is moved up to the nearest gap between lines, looking back as far as 30 percent of a page, so lines of text are not cut in half. When there is no gap in that range, for example inside a picture taller than a page, the page is cut at its normal height.

Common questions

How do I convert a web page to PDF from its URL?
Choose Web page URL, type the address and press Convert to PDF. Our server fetches the HTML, then your browser lays it out and draws the PDF. Pages behind a login or built entirely with JavaScript may come out empty.
Can I convert HTML code to PDF without a server?
Yes. With Paste HTML or Upload .html, nothing is sent anywhere. The code is cleaned, laid out in a hidden frame in your browser and saved as a PDF.
What does screen width do in HTML to PDF?
It sets how wide the page is laid out before being scaled onto the paper. Full HD at 1920 px or Desktop at 1440 px gives the full desktop design; Phone at 390 px or Small phone at 320 px gives the mobile layout; Fit the paper width lays the page out at the width of the printable area.
Can I save a whole web page as one long PDF page?
Yes. Choose One long page as the page size. The PDF page is as tall as the web page, up to the 200 inch limit PDF readers allow, after which it continues on another page.
How do I remove cookie banners from a web page PDF?
Keep Remove fixed cookie bars, headers and pop-ups ticked. Elements pinned to the screen are removed and sticky headers are made to scroll with the page, so they do not repeat or cover content.
Why are some pictures missing from my HTML to PDF download?
Browsers only allow a picture from another site to be copied into a PDF when that site permits it. Pictures from sites that block this are left blank in the download. Print / Save as PDF usually keeps them.
Does HTML to PDF run JavaScript on the page?
No. Scripts, frames and event handlers are removed before the page is drawn. That keeps pasted code safe, but content that a script loads after the page opens will be missing.
Why do relative image paths not work in my uploaded HTML file?
An uploaded .html file has no web address, so paths like images/logo.png cannot be found. Upload the site as a .zip instead, with the .html, CSS, pictures and fonts inside; local files are then built into the page. Full https:// addresses also work.
Are links clickable in the PDF made from HTML?
Yes. Every link with a web or email address becomes a clickable area in the PDF, placed over the link text.
When should I use Print / Save as PDF instead of Convert to PDF?
Use it when you need real, selectable text in any language, the page's own web fonts, or its print stylesheet. Convert to PDF is better when you want exact screen widths, one long page, or the same look on every device.

More PDF tools

View all