PDF Tools

HTML to PDF

Paste HTML into a text box and the tool draws it in a hidden A4-width container, captures it as an image, and cuts that image into A4 pages of a downloadable PDF. The result is a picture of the page, so the text in the PDF is not selectable.

🌐

HTML to PDF Converter

Convert HTML code to PDF documents, entirely in your browser.

100% private — your HTML never leaves your browser

Notes:

  • Renders your HTML and basic CSS to a multi-page PDF
  • Runs 100% in your browser — no upload, no server
  • Complex CSS layouts (flex/grid) may render approximately
  • JavaScript in the HTML is not executed

How to Use

  1. 1Paste your HTML into the 'HTML Code' box. You can paste a whole document or just a fragment; there is no file upload.
  2. 2Click Convert to PDF. The button stays disabled while the box is empty.
  3. 3Wait for 'Processing...' to finish; the browser downloads a file named converted.pdf automatically.
  4. 4Open the PDF and check page breaks and layout, then adjust the HTML and convert again if needed.

About this tool

Updated

One local HTML file becomes a PDF

The file's body content is read and rendered to PDF pages. There is no URL box — this converts a file you already have.

That distinction matters. To capture a live web page, your browser's own Print to PDF does it properly, complete with images and the site's stylesheet, and no online tool will beat it. This page is for an HTML file sitting on your device: an exported report, a saved email, a template, or output from another program that you need in a portable format.

Styling and assets are not fetched

External stylesheets, images and fonts referenced by the file are not loaded, so the result is essentially the text and structure.

An HTML file usually points at other things — a CSS file, an images folder, a web font — and those references are not followed here. The practical effect is a plain but readable document rather than a visual copy of the page. If the appearance is the point, open the file in your browser and print to PDF instead, which resolves everything relative to the file's own folder.

What it is genuinely good for

Getting text content out of an HTML file into something fixed, portable and easy to attach.

Exported data, saved articles, generated reports and archived pages are all cases where the words are what matter and the styling is incidental. A PDF is easier to email, sign and archive than a loose HTML file, and it will look the same for whoever opens it, which an HTML file with missing assets very much will not.

Check the output before you send it

Complex pages with tables, columns or scripted content may come out flattened or reordered.

Anything the page built with JavaScript after loading is not in the file at all, so it cannot appear. Multi-column layouts collapse to a single flow, and tables can lose their alignment. For a simple document this is invisible; for a complicated page it is worth a quick look through the PDF before you rely on it.

Features

  • Input is pasted HTML code in a text box; there is no file upload and no page-count limit stated in the code
  • If your HTML contains a body element, only the contents of the body are rendered
  • Rendered at about A4 width (794 px) with 24 px padding, Arial as the default font, on a white background
  • Output is A4 pages made from a JPEG image of the render, so text cannot be selected or searched
  • JavaScript in the pasted HTML is not executed
  • Runs in your browser; the HTML is not sent anywhere

FAQ

Which HTML and CSS actually work?

The page is rendered by html2canvas, which redraws HTML and CSS itself rather than using the browser's print engine. Ordinary text, headings, lists, tables, colours, borders, fonts available on your device and inline or in-body style rules work. Flexbox and grid usually render but may be approximate, and some features such as certain filters, blend modes and pseudo-element tricks do not. Page-break CSS (page-break-before, break-inside) is ignored.

Why does a full HTML document lose its styles?

When your pasted code has a body tag, the tool keeps only what is inside the body. A style block in the head is discarded. Put your style tags inside the body, or use inline styles, and the CSS will be applied.

Can I select or copy the text in the resulting PDF?

No. The page is captured as an image and each A4 slice is placed into the PDF as a JPEG, so the PDF contains no text layer. Links are not clickable either, and file size grows with the length of the content. If you need searchable text, run the result through OCR PDF.

Where does the page break fall, and do images load?

Pages are simply cut every A4 height, so a line of text or an image can be sliced in half at a page boundary. Images load only if their address is reachable from your browser and allows cross-origin use; images on other sites that block that will be missing. Very long content may fail because browsers limit the size of a canvas.

Is my HTML uploaded?

The rendering and PDF creation happen in your browser and the tool does not send your HTML anywhere. Note that any external images or fonts referenced in your HTML are fetched by your browser from those addresses.