← Toolz / PDF Tools / HTML to PDF

HTML to PDF

PDF·23

Paste HTML on the left, watch it render live on the right, then download it as a paginated PDF. Long content flows across as many pages as it needs — page breaks are placed in the gaps between lines, not through them. Runs fully in your browser — nothing is uploaded.

Live preview (A4 width)

Turn a snippet of HTML — an invoice, a receipt, a styled note — into a clean paginated PDF without opening a code editor.

100% free · No sign-up · No daily limits · No watermarks · Processed in your browser — files never leave your device

UNDERSTAND YOUR RESULTS

HTML to PDF — Paste HTML, Preview It, Download a PDF guide

Paste HTML code, see it rendered live on an A4-width sheet, and download it as a paginated PDF (A4 or Letter, portrait or landscape) — long content flows across as many pages as it needs, with page breaks placed in the gaps between lines.

How to use this tool

  1. Paste your HTML into the box — a full block with inline styles works best, since external stylesheets and images from the web are not fetched. The preview on the white A4 sheet updates as you type.
  2. Check the preview: its width follows the page size you picked (794 px for A4, 816 px for Letter, at 96 CSS px per inch), so what you see is the width the PDF will have. Fix anything that overflows or wraps badly.
  3. Click Download as PDF. The sheet is rendered at double resolution and sliced into pages, each break snapped to a blank gap between lines so text is not cut in half; the done message reports how many pages it made.

A worked example

A freelancer keeps her invoice as an HTML template. She pastes it in, changes the client name and amounts in the code, watches the preview update, and downloads a tidy PDF invoice — the same template, reused every month, with no design tool involved.

What you can do with this tool

How it works

The preview is your own HTML rendered by the browser itself inside the page sheet. For the PDF, the sheet is captured as a high-resolution image and sliced into page-height chunks, one per page — each cut moved to a nearby blank gap between lines — then assembled into a PDF in your browser. Because the pages are images of the rendered HTML, fonts, colours and layout match the preview exactly.

Frequently asked questions

Why is the text in my PDF not selectable?

The converter photographs the rendered HTML so the layout is pixel-faithful. Selectable text requires building the PDF from text directly — that is what Text to PDF does for plain content.

Can I paste a whole web page’s source?

You can, but pages built for the screen usually rely on external CSS and scripts that will not be fetched, so the result is the unstyled skeleton. Self-contained HTML with inline styles converts best.

How does pagination work?

The rendered sheet is sliced every page-height (A4 or Letter, in the orientation you chose), and each cut is snapped to the nearest blank gap so lines stay whole. A sheet exactly one page tall makes a one-page PDF; longer HTML becomes as many pages as it needs, and trailing blank space never becomes an empty final page.

What size is the preview sheet?

As wide as the page you choose — 794 px for A4, 816 px for Letter, at 96 CSS px per inch — with 48 px padding, printed at double resolution for sharpness.

Is my HTML uploaded?

No. The preview renders locally, the capture happens in your browser, and the PDF downloads from the tab.