HTML to PDF

Paste your HTML code and turn it into a PDF in seconds. Choose A4 or Letter, portrait or landscape, then download the result — free, no signup, and your code never leaves your browser.

🔒 Files never leave your browser
Upload file

Drag & drop your file here

or click to browse your device

Paste your HTML below, or drop an .html file in the box above.

Preview

This tool converts the HTML you paste — it does not fetch web pages from a URL, and scripts in your code are removed for safety. Images from other websites load only if that site allows it.

HTML to PDF is a free online tool that turns HTML code into a PDF document. Paste your markup — an invoice, a receipt, a report, a certificate, a formatted letter — pick a page size and orientation, and download a clean PDF in seconds. There is no signup, no watermark and no upload: the conversion runs entirely in your browser, so your code never leaves your device.

Using it is simple. Paste your HTML into the editor, or drop an .html file into the box above, and a live preview shows how the page will look. Choose A4 or Letter, portrait or landscape, set your margins, and pick standard quality for a smaller file or high quality for crisper text. Click Convert to PDF and the tool renders your markup and splits it across as many PDF pages as it needs. Long documents are handled automatically — nothing is cut off at the bottom of the first page.

Developers use it to check how a piece of markup prints and to hand a client a PDF instead of a code file. Small businesses turn simple HTML receipts, invoices and quotes into PDFs they can email or archive. Teachers and trainers build worksheets and certificates in HTML — easy to edit and reuse — and convert them when they need a fixed, printable format. Anyone with a designed page can keep a neat PDF copy without installing software or opening a word processor.

A few tips for the best result: inline styles work most reliably, so put your colours, fonts and spacing in style attributes or a <style> block. Keep your layout close to A4 width (about 794 pixels) and avoid fixed heights, so content flows naturally across pages. Images from other websites only load if that site allows it, and scripts in your code are removed for safety — this tool converts static markup, it does not run a web page. It also cannot fetch a page from a URL: to save a live website, paste its HTML here or use your browser’s Print → Save as PDF instead.

Steps at a glance

  1. Paste your HTML code into the editor — or drop an .html file into the box above.
  2. Check the live preview and choose A4 or Letter, portrait or landscape, margins and quality.
  3. Click Convert to PDF and wait a moment while the pages are built.
  4. Download your PDF — long documents are split across pages automatically.

Why convert HTML to PDF with GroPDF?

Most HTML-to-PDF options are server tools that upload your code, add a watermark, or charge for the download. GroPDF converts in your browser, so nothing is uploaded, there is no watermark, and there is no account or payment. You get a live preview before converting, real page sizes to choose from, and a clean multi-page PDF you can email, print or archive.

Common use cases

  • Turning an HTML invoice, receipt or quote into a PDF to email a client.
  • Saving a certificate, letter or report designed in HTML as a fixed printable file.
  • Checking how a piece of markup will look on paper before sending it on.
  • Converting an .html file saved from another app into a shareable PDF.

Things to know

This tool converts the HTML you paste — it does not fetch web pages from a URL, and it does not run JavaScript: scripts are removed before rendering. Images hosted on other websites only load if that site allows cross-origin use. Very new CSS (such as oklch colours) and some complex grid or flexbox layouts may render differently from a full browser; inline styles and simple layouts give the most faithful result.

Frequently asked questions

Can I convert a web page by pasting its URL?

No. This tool converts HTML code that you paste into the editor, or an .html file you drop in. It does not fetch pages from a URL, because that needs a server. To save a live web page as a PDF, use your browser’s Print menu and choose Save as PDF.

Is my HTML code private?

Yes. The conversion runs entirely in your browser using code loaded with the page. Your HTML is never uploaded to a server, so it is safe for invoices, letters and other private documents.

Why do some styles look different in the PDF?

The tool renders your markup with an in-browser renderer, which supports most common HTML and CSS but not everything a full browser does. Inline styles and simple layouts work best. Very new CSS such as oklch colours, some grid and flexbox edge cases, web fonts that fail to load, and JavaScript are not fully supported — scripts are removed before rendering.

Can I make a multi-page PDF?

Yes. If your HTML is longer than one page, the tool automatically splits it across as many A4 or Letter pages as needed. Choose your page size, orientation and margins first, and the split follows those settings.