HTML to PDF
HTML to PDF renders markup in a sandboxed frame and captures it to a PDF. Paste a snippet or upload an .html file, choose the page size and margins, and download. Inline CSS is applied; images and stylesheets hosted on other servers cannot be fetched, so embed what you need or expect it to be missing.
1 Add your file
Enter the open password to use it here. It is checked in your browser and never sent anywhere.
2 Choose your options
Your markup is rendered in a sandboxed frame with no network access and then captured to a PDF. Inline styles and embedded <style> blocks are applied. Stylesheets, images, fonts and scripts hosted on other servers cannot be fetched — partly because the frame is sandboxed for your safety, and partly because that would mean making requests on your behalf. Embed what you need as inline CSS and data: URLs, or expect those pieces to be missing.
How to HTML to PDF
Paste your HTML or upload a file
Either works. A file's contents are loaded into the same box so you can tweak before converting.
Set the page
Choose the paper size, orientation and margin. Raise the render scale for sharper text.
Download the PDF
The rendered markup is captured and paginated into a PDF.
Printing a page, not archiving a website
Conversion renders the HTML with your browser's own engine and paginates the result, which is the same path as printing to PDF — so what you get is what the page looks like in print, including whatever print stylesheet the author wrote.
That distinction explains most surprises. A site whose print styles hide navigation and sidebars will produce a clean article; a site with no print styles will produce whatever its screen layout does when cut into pages.
A worked example
An invoice built as an HTML template converts with its sidebar and cookie banner
included, because the template has no print rules. Adding a small
@media print block that hides those elements and sets the page margin
turns the same file into a clean single-page document — a change in the source, not in
the converter.
Limitations worth knowing
- Content that loads only after scrolling, or only once a user interacts, may not be present when the page is captured.
- Anything behind a login cannot be fetched; save the page locally first and convert the saved file.
- Page breaks fall where the layout allows. Use CSS such as
break-inside: avoidin the source to keep tables and figures whole. - Interactive elements — forms, scripts, video — become static images of themselves.
- A converted page captures one moment. It is a print, not an archive, and links to external resources are not preserved offline.
Related tools
HTML to PDF — frequently asked questions
No, and deliberately so. Fetching a URL would mean our code making a request to that site on your behalf, which is exactly the kind of thing a privacy-first tool should not do. Save the page from your browser and upload the .html file, or paste the markup.
Because the preview frame is sandboxed and cannot load anything across the network. Embed images as data: URLs and they will appear.
Inline style attributes and embedded <style> blocks work. Linked external stylesheets do not, for the same sandboxing reason as images.
No. Scripts are blocked in the sandboxed frame. What you see is the static markup, rendered.
The rendered page is captured as a tall image and sliced to your chosen paper size. That means a break can land mid-paragraph. Adding explicit spacing where you want breaks is the practical workaround.