HTML to PDF

Convert HTML into a PDF document with full local rendering.

What HTML to PDF does

HTML to PDF renders markup into a paginated PDF using the browser as the layout engine. Because the browser is doing the layout, complex CSS — flexbox, tables, web fonts — renders the way it would on screen. Pasted markup is sanitised first: scripts, frames and any remote image or stylesheet reference are stripped, so a page cannot fetch anything from the network while it is being converted.

How to html to pdf

  1. Paste your HTML into the editor.
  2. Press Convert to PDF.
  3. Download the rendered document.

Privacy

The markup is rendered in a hidden container on your device. Sanitising removes every remote reference, so the conversion makes no network requests at all.

Questions

Can I use an external stylesheet?

Inline styles work. Remote stylesheets and remote images are deliberately removed, because fetching them would break the promise that the page is processed without any network request.

Can I include images?

Yes, if they are embedded as data URIs. Remote image URLs are stripped for the same reason.

How are long documents paginated?

The rendered page is sliced into page-height strips. Very long documents can exceed what a single canvas can hold.