Convert HTML to PDF screenshot

Convert HTML to PDF

Render an uploaded HTML file to PDF. Scripts in the file do not run and remote images and stylesheets are not loaded; the text, structure and inline CSS are kept. The file is sent to the tool server for that run and not stored.

Privacy First
0 Runs
Updated 2026-11-07
Runs on the tool server
No account needed
Upload not stored after the run
No outbound request during render

What this HTML to PDF conversion does

Renders the HTML file you upload with LibreOffice and returns the PDF it lays out. Headings, paragraphs, tables, lists and inline CSS come across, so a saved page, an exported email or a generated report becomes a document that opens anywhere and prints the same on every machine. The output is a fixed-layout copy: it cannot be edited by accident and it carries no live markup.

What this page promises

The file is uploaded: it is sent to the tool server for this run and is not stored. Scripts in the file do not run, and remote images and stylesheets are not loaded. Before the renderer sees the document it is stripped of every element and attribute that could execute or fetch, so a page that pointed at a tracking pixel renders that image's alt text instead of calling home, and a stylesheet that asked for a remote font arrives without it. Text, structure and inline CSS are kept, which is why the result reads like the page you uploaded rather than a screenshot of one.

A file, not a link

This tool takes an HTML file, not a URL. Fetching a page and everything it references is a different job with a different security boundary, and the form here has no URL field. If you only have the address, save the page from your browser first and upload the file.

How to use it

Choose an .html or .htm file and press Run. The result is a PDF you download, with its page count and size shown beside it. A file over 12 MB is refused before conversion starts, and a file with no content is refused with a message rather than returned as a blank page.

What it will not do

It does not run JavaScript, so a page whose content is drawn by a script arrives with whatever markup it shipped. It does not load web fonts, remote stylesheets or remote images, and it does not reproduce a browser's layout: LibreOffice's HTML import is a document renderer, so a responsive grid arrives as a linear document and a fixed header is simply the first heading. A conversion that produces nothing fails with a message instead of an empty download.

Privacy. The file is sent to the tool server for this run and is not stored, and the temporary directory holding it is deleted when the run ends.

Upload an `.html` or `.htm` file and this page renders it to a PDF on the tool server. Scripts in the file do not run, and remote images and stylesheets are not fetched.

The markup is scrubbed before it reaches the renderer: text, structure and inline CSS survive; scripts, event handlers, remote sources and every other URL-bearing attribute do not. What reaches the renderer therefore contains no address to resolve.

The result is named `html-to-pdf.pdf`. The upload is sent for that run and is not stored, and macros are disabled in the renderer's profile in case the file tries to be more than HTML.

What the PDF will look like

Because remote stylesheets are not loaded, a page whose look depends on an external CSS file renders with the browser's default styling plus whatever inline CSS it carried. That is the difference you will notice first.

Images referenced by URL are removed rather than left broken, so the layout closes up around them. An image embedded as a data URI is part of the markup and survives.

A file with no readable content is refused with its own sentence, and a renderer that produces no PDF is reported as a failure rather than returning an empty file.

  • Accepts .html and .htm
  • Inline CSS and structure kept
  • Scripts, event handlers and remote assets removed

Why the sanitising step exists

An HTML importer will happily fetch an image, follow a stylesheet import or resolve a CSS `url()`, which would turn a file upload into an outbound request. The scrub removes those references so the render can never reach the network.

The same step is why a page designed with a JavaScript chart or a web font renders without them. The security boundary and the visual difference are the same decision, seen from two sides.

How to use the file upload

Upload the `.html` or `.htm` file and run the tool. The markup is scrubbed first: text, structure and inline CSS survive, while scripts, handlers, remote sources and URL-bearing attributes do not, and scripts never run.

Download `html-to-pdf.pdf`, rendered on the tool server without fetching anything remote. The upload is sent for that run and not stored.

What to Expect

Best for

  • A self-contained HTML document rendered to a fixed file
  • Archiving a page whose styling is inline
  • Producing a PDF without a browser's print dialogue

Not ideal for

  • A page that depends on an external stylesheet or a CDN font
  • Anything rendered by JavaScript, which does not run
  • A pixel-accurate match of the live site

What this tool keeps

  • The document's structure and its inline CSS
  • Embedded data-URI images
  • The text content exactly as written

What may need cleanup

  • Missing external styling, which the scrub removes by design
  • Removed remote images, which leave gaps the layout closes over
  • Fonts, which fall back to what the renderer has installed

Common errors

  • Uploading a page that loads its CSS from a CDN and getting an unstyled PDF
  • Expecting a JavaScript chart to appear
  • Reading the scrub as a rendering bug rather than the security boundary

Example use cases

  • Archiving a self-contained report page
  • Turning an HTML invoice template into a PDF
  • Producing a printable version of an inline-styled document

Sample input

A single HTML file whose styling lives in a style block and whose images are data URIs.

Sample output

A PDF named html-to-pdf.pdf that keeps the layout and the inline styling, with no outbound request made.

Who this is for

  • People archiving a self-contained page
  • Teams producing a PDF from an HTML template
  • Anyone who wants a render without a print dialogue

Frequently asked questions

How is the HTML turned into a PDF?

It is rendered on the tool server, with scripts not run and remote images and stylesheets not fetched.

Why is my page missing its styling?

External CSS and CDN fonts are scrubbed by design, so only the document's structure and inline CSS are kept.

Do scripts in the HTML run?

No. Scripts do not run, so anything rendered by JavaScript is absent from the PDF.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.