HTML to PDF

Turn a page or snippet into a paginated PDF.

HTML source

Preview

About HTML to PDF

Convert an HTML file or pasted markup into a PDF with real pagination and selectable text. Scripts are never executed and remote resources are not fetched, so nothing leaves your machine.

Printing a page to PDF from a browser gives you the browser’s print stylesheet, its headers and its page breaks, which is rarely what you wanted.

This paginates the content properly and keeps the text real.

  • Processed on your deviceEverything you open or type here is handled by this page and never uploaded anywhere.
  • No queue, no limitsNothing waits on a server, so the only limit is your own hardware.
  • No account neededNo sign-up and no email address required.

How HTML to PDF works in your browser

The markup is parsed inside an inert document, so no script runs and no remote resource is fetched, then converted into the structured document model and laid onto pages by the PDF writer.

That writer paginates lists and tables, repeats table headers across page breaks, wraps mixed bold and italic runs, and draws link annotations so links remain clickable in the PDF. Page numbers are added in a second pass once the total page count is known.

Because the model is built from structure rather than from a screenshot of a rendered page, the output contains selectable, searchable text. What it does not do is reproduce arbitrary CSS layout — this is a document renderer, not a browser engine, and a page built out of absolute positioning will not survive.

When to use it

  • Turning an exported HTML report into a PDF to file or send.
  • Converting a saved web page into a fixed document.
  • Producing a PDF from generated markup without running a headless browser.
  • Converting a page containing private data without sending the markup anywhere.

Frequently asked questions

Will scripts on the page run?

No. Scripts are never executed and remote resources are not fetched, so converting a page you were sent cannot cause it to call out to anything.

Is the text in the PDF selectable?

Yes. The output has real pagination and selectable text rather than being a screenshot of the page.

Will it look exactly like the browser rendering?

Close for document-like pages. Complex CSS layouts designed for a scrolling screen have to be reflowed into fixed pages, so some difference is unavoidable.