Convert HTML to PDF Online Free — Web Page to PDF

Convert HTML code or a web page URL into a high-quality PDF directly in the browser. Paste the HTML code or enter a link and get a ready PDF in seconds. Free, no account, no installation.

HTML to PDF conversion illustration: HTML web page transformed into a PDF document

Drag your HTML file here

or drag the file here

100% private
Instant
Free

or open the full PDF editor for annotations, signatures and much more.

How it works

Upload or paste HTML

Drag an .html file or paste the HTML code into the editor. You can also enter a URL.

Generate the PDF

The rendering engine processes the HTML code with CSS and images and generates a faithful PDF.

Download the PDF

The PDF is downloaded directly to your device in seconds.

Why OnlinePdfEditor

100% Private

Everything runs in the browser via WebAssembly. Your PDF is never sent to any server.

Instant

No upload, no queue. Processing is local and completes in seconds even for large files.

Free, no tricks

No required account, no credit card, no watermark. Truly free.

Works everywhere

PC, Mac, iPhone, Android — just a modern browser. Safari, Chrome, Firefox or Edge.

How it works

Converting an HTML page to PDF is useful for archiving web articles, creating documents from online content, or generating PDFs from custom HTML templates. OnlinePdfEditor accepts local .html files and converts them to PDF directly in the browser.

The conversion uses html2canvas to capture the visual rendering of the page and embeds it in the PDF as a high-resolution image. Inline CSS and style sheets embedded in the HTML file are correctly applied — it supports flexbox, grid, CSS variables, and most modern CSS3 properties. Images referenced with relative paths are included if the files are in the same folder.

Fundamental difference from 'PDF to HTML' — which goes in the opposite direction: this conversion is for those who have a web document and want a PDF; that one is for those who have a PDF and want a web page. A frequent use case for 'HTML to PDF': you have an invoice template in HTML/CSS and want to generate fillable PDFs; another: you want to archive a web article saved as .html before it is removed from the site. Limitation: the conversion captures the page as a visual snapshot, not native text — the resulting PDF is an image, not a searchable text document.

Frequently asked questions

Il PDF risultante ha il testo selezionabile?

No. La conversione usa html2canvas che cattura la pagina come immagine ad alta risoluzione. Il PDF contiene l'immagine della pagina, non testo nativo. Se hai bisogno di testo selezionabile nel PDF, usa un browser come Chrome che può stampare in PDF direttamente (File → Stampa → Salva come PDF) con testo nativo preservato.

Qual è la differenza rispetto a 'PDF in HTML'?

Sono conversioni opposte. 'HTML in PDF' converte una pagina web in documento PDF. 'PDF in HTML' converte un documento PDF in pagina web. Non sono intercambiabili — scegli in base al formato di partenza che hai e quello di destinazione che ti serve.

Is the text in the resulting PDF selectable?

No. The conversion uses html2canvas which captures the page as a high-resolution image. The PDF contains the page image, not native text. If you need selectable text in the PDF, use a browser like Chrome to print directly to PDF (File → Print → Save as PDF) which preserves native text.

What is the difference compared to 'PDF to HTML'?

They are opposite conversions. 'HTML to PDF' converts a web page into a PDF document. 'PDF to HTML' converts a PDF document into a web page. They are not interchangeable — choose based on the format you have and the output format you need.

Can I convert a web page by entering its URL?

Yes. Enter the web page URL and the tool renders it and converts it to PDF, including images and CSS.

Is CSS applied in the PDF?

Yes. CSS styles included in the HTML code or referenced as external files are applied when generating the PDF.

Can I convert local HTML files?

Yes. Drag the .html file from your computer into the upload area. CSS files and images in the same folder are included automatically.

Are my files uploaded to a server?

No. Conversion of local HTML files happens entirely in the browser. For external web page URLs, the content is downloaded for conversion.

Does it work with responsive web pages?

Yes. You can specify the viewport width to simulate desktop, tablet or mobile before conversion.

Ready to start?

Free, in the browser, nothing to install. Upload your PDF and go.

This site uses technical cookies and Google Analytics to improve your experience. & .