Skip to content
Runs on your deviceWorks offline

Convert HTML to PDF

Turn a web page or HTML file into a PDF, laid out by your own browser.

HTML

Before you convert

This one finishes in a print dialog.

Your browser lays the page out — that is what makes the CSS come out right — so the PDF comes from its print window rather than as a download. Choose “Save as PDF” there, and switch off “Headers and footers” unless you want the URL and date on the page.

Paste some HTML first

Once you have the PDF, it can be merged, compressed or password protected like any other.

Local processingNo server uploadYour files are processed in your browser and are not uploaded to our servers.

What to know about HTML to PDF

Paste HTML or open a file and turn it into a PDF using the layout engine already in your browser — the same one that renders every page you read, so the result matches what a browser shows. Your file is never uploaded.

Converting HTML to PDF well means implementing CSS, and CSS is the accumulated work of three decades. Every tool that claims to do it either implements a subset — which is why so many of them mangle flexbox, or grid, or web fonts — or renders the page in a real browser somewhere and gives you the result.

The second approach is the right one, and there is a browser already on your machine.

So this hands your markup to the engine that draws every page you read, with a print stylesheet on top for page size, margins and where pages are allowed to break. The output has real selectable text, your fonts, and your layout. What it does not have is a download: you arrive at a print dialog and choose Save as PDF yourself. That is more steps than anything else on this site, and it is stated before you start rather than discovered afterwards.

Scripts are removed before anything renders. A document being printed has no use for behaviour, and the markup is written into a window on your own machine where anything executable would run. The cost is real but narrow: a page that assembles its own content with JavaScript arrives empty, and the fix is to save the rendered page from your browser and convert that instead.

The part that deserves the most care is remote resources. A page that references an image, a stylesheet or a font on another server will fetch it when it renders — exactly as it would in any browser. The markup itself never leaves your device, but "nothing leaves your device" is not the whole truth for a file that points at somebody else's server, and a privacy-first tool that let that pass silently would be trading on a promise it was quietly breaking. So the hosts are found and named before anything is loaded, and you decide whether to go ahead. A document with its images embedded as data URLs makes no requests at all, and converts with the network switched off.

What this cannot do is take a web address. Fetching a URL would mean either a server of ours requesting it — which uploads nothing but does tell us what you are reading — or your browser requesting it, which the majority of sites refuse from another origin. Neither is worth building a feature on. If the page is already open in a browser, that browser can print it; if it is not, save it first and convert the file.

How to convert HTML to PDF

  1. 1

    Bring in the HTML

    Paste it into the box or open an .html file. It is read on your device and no copy is sent anywhere.

  2. 2

    Check what it references

    If the page points at images or fonts on other servers, those hosts are listed before anything renders, so nothing is fetched by surprise.

  3. 3

    Print it to PDF

    A print window opens with your page laid out. Choose Save as PDF as the destination, and switch off headers and footers if you do not want the URL and date on it.

What HTML to PDF accepts and produces

Input
HTML, pasted in or opened from an .html file.
Output
A PDF produced through your browser's print dialog, with selectable text and your CSS applied.
Limits
The result arrives through the print dialog rather than as a direct download, so you choose Save as PDF yourself. Scripts are removed before rendering — a document that builds itself with JavaScript will come out empty. A page referencing remote images or fonts will fetch them when it renders.
Offline
Yes, for self-contained HTML. A page that links to remote files needs those.

Why HTML to PDF here

  • Your browser's own CSS engine, so the PDF matches what a browser renders
  • Real selectable text, not a screenshot of the page
  • Scripts are stripped before anything renders
  • Remote hosts are named before the page is loaded, never fetched silently
  • The HTML itself is never uploaded — no account, no queue, no size limit

Where your file goes

Nowhere. This tool runs inside your browser, and the page is served with a policy that forbids it from sending your document anywhere. You can confirm that yourself: open your browser’s developer tools, watch the Network tab, and process a file.

Questions

Why does this open a print dialog instead of downloading a file?

Because the thing laying out your HTML is the browser, and the way to ask a browser for a PDF of what it has rendered is to print it. The alternative would be to implement CSS ourselves, which is not a weekend's work and would produce a worse result than the engine already on your machine. It is more steps than the other tools here, which is why the page says so before you start.

Will my CSS be applied?

Yes. Style blocks in the document are kept, and everything is rendered by the same engine that draws every page you read, so what you see in the print preview is what a browser makes of your markup. Print-specific rules are added on top for page size, margins and page breaks.

Is my HTML uploaded?

No. It is read, cleaned and written into a window on your own machine. Open your browser's network panel while you convert — nothing carrying your markup goes out.

What about images and fonts hosted elsewhere?

Those are fetched, because a document without its logo is not the document you wanted. That means requests to those servers, which is a real thing to know on a site whose promise is that files stay put — so every host your page references is listed before you render, and you can decide. A page that embeds its images as data URLs makes no requests at all.

Why was my JavaScript removed?

Because the document is written into a window on your machine and anything executable in it would run there. For a page being printed the cost is nil — a printed document has no behaviour — but it does mean a page that builds its own content with JavaScript arrives empty. Save such a page from the browser first, then convert the saved copy.

Can I convert a live web page by pasting its address?

No, and that is deliberate rather than missing. Fetching a URL for you would mean either our server requesting it, which uploads nothing but tells us what you are reading, or your browser requesting it, which most sites block. Open the page, save it, and convert the file — or print the page directly from the browser it is already in.

Will the page numbers and URL appear on my PDF?

Only if the print dialog is set to add them, which most browsers do by default. Switch off headers and footers in the dialog and they disappear. It is a browser setting rather than something the page controls.