HTML to PDF Converter

Last updated: October 1, 2026

✅ Free Forever 🔒 Files Stay on Your Device ⚡ No Signup Required 🌐 Works in Any Browser

Drop your file here

or click to browse

Accepted: .html,.htm,text/html

What is HTML to PDF Converter?

Convert an HTML file into a PDF with real selectable, searchable text, at the page size, orientation and margins you choose. It runs in your browser, so nothing is uploaded. There are two tabs and they behave very differently — the next section explains which one you want.

Use the Upload tab, not Paste

The two tabs take completely different routes, and the results are not comparable. This is worth knowing before you start, because there is nothing on screen to tell you.

Upload HTML File applies your page settings to the document and sends it to your browser's own print engine, where you save it as a PDF. The text stays text — selectable, searchable, copyable — the document paginates properly across A4 or Letter pages, and your margins are respected. This is what you want in almost every case.

Paste HTML takes a different route entirely: it renders your markup and then photographs it, putting that picture into a PDF. So the output is a flat image — no selectable text, nothing searchable, and nothing a screen reader can read. It also produces one single page sized to your content rather than paginated sheets, so a long document becomes one enormous page. And it ignores the page size, orientation and margin settings completely.

So: save your HTML to a file and use the Upload tab. On any operating system that is a two-second job — in a text editor, Save As with a `.html` extension; or if the page is in your browser already, Ctrl+S.

The paste tab is genuinely useful for exactly one thing: a quick visual snapshot of a fragment of markup, where you want a picture and do not care about the text. For anything you will print, share, search or archive, upload the file.

How the conversion works, and why that is good

Worth understanding because it explains the quality.

Rather than re-implementing a rendering engine, this hands your document to the one already in your browser — the same engine that displays every web page you look at. Your page settings are applied as real print instructions, a print window opens, and you choose Save as PDF as the destination.

That has three consequences worth having. The rendering is exactly right, because it is the same engine that would display the page. The text remains text, so the PDF is searchable and accessible. And nothing is uploaded, which matters for an unreleased design, an internal report or a client's page.

Two practical notes. Your browser must allow popups for this site or the window cannot open — the tool will tell you if it is blocked. And the PDF comes from the print dialog rather than as a direct download, so there is nothing to click on this page afterwards.

Background colours survive

A small detail that solves a problem people spend real time on.

Browsers deliberately strip background colours and images when printing, to save ink. It is a sensible default for printing a web article and completely wrong when you are producing a PDF of a designed document — your coloured headers, highlighted boxes and dark sections all come out white, and the result looks broken.

This tool sets the instruction that tells the browser to print colours exactly as designed, so backgrounds are preserved automatically. You do not have to find the "Background graphics" checkbox in the print dialog, though it is worth knowing it exists if you ever want the opposite.

Page size, orientation and margins

These are applied as genuine print instructions before the dialog opens, so they take effect on the output.

A4 or Letter. A4 for most of the world, Letter for the United States and Canada. Getting this wrong is a common cause of a document that prints with odd gaps or clipped edges, so match it to where the PDF is going.

Portrait or Landscape. Landscape is worth considering for a wide table, a dashboard, a chart or a design mock-up — a wide layout squeezed into portrait is the other common cause of a bad result.

Margins: None, Normal or Wide. Normal is a sensible centimetre. None is what you want for a full-bleed design, a poster or a page whose own CSS already handles its spacing — with the caveat that most physical printers cannot print to the very edge, so use it for screen PDFs rather than for something going to paper. Wide gives room for binding or annotation.

One thing to expect: the print dialog also has its own paper and margin settings, and whatever you choose there applies on top. If the result is not what you asked for, check the dialog.

What will not come through

Three things, all worth knowing before you blame the tool.

Linked files, if you did not keep them. An HTML file usually references its stylesheets, images and fonts rather than containing them. If you saved a page and moved only the `.html` file, those links break and you get unstyled text. When saving a page from a browser, choose the option that saves the complete page — that produces a folder of assets alongside the file, and both must stay together. A self-contained HTML file with everything inlined is the most reliable input of all.

Anything JavaScript was going to build. If your content is rendered by scripts — a framework app, a chart drawn on load, content fetched from an API — it will not be in the PDF, because a saved HTML file contains the markup rather than the result of running it. For those, open the page in your browser, let it load fully, and print to PDF directly with Ctrl+P. That is the same mechanism and it captures the finished state.

Interactivity, obviously. Hover effects, animations, videos, accordions and forms become their static state. Anything hidden behind a collapsed section stays hidden — so expand what you need before saving the page.

When to skip this and press Ctrl+P

Being straight about it, because sometimes the answer is simpler.

If the page you want is already open in your browser, Ctrl+P and Save as PDF does the same thing more directly. It is the same print engine, and it has the advantage of capturing the page exactly as it currently is, scripts and all.

This tool is the better route when you have an HTML file rather than a live page · you want consistent page settings applied without configuring the dialog each time · you are converting several files and want the same result each time · or you want the background colours handled for you.

For a one-off page you are looking at, use Ctrl+P. Nobody needs a tool for that, and saying so is more useful than pretending otherwise.

Related tools

Markdown to HTML Converter turns Markdown into HTML, which you can then convert here. URL to PDF works from a web address rather than a file, and its page is honest about the sites that block it. TXT to PDF Converter handles plain text with real selectable output.

How to Use HTML to PDF Converter

  1. Upload or Paste HTML

    Upload an HTML file or switch to Paste HTML tab and type your HTML code.

  2. Set Page Options

    Choose page size, orientation, and margins.

  3. Save as PDF

    For uploaded files use the print dialog. For pasted HTML click Convert to PDF for a direct download.

Features

Print-Quality Output

Upload mode uses the browser print engine for highest fidelity PDF output.

Paste Mode

Paste HTML directly and convert to PDF without creating a file.

Page Control

Set page size, orientation, and margins before converting.

Frequently Asked Questions

What is the difference between the Upload and Paste tabs?

A large one. Upload applies your page settings and uses your browser print engine, so the text stays selectable and searchable and the document paginates properly. Paste photographs your markup instead, producing a flat image in one single page sized to the content, and it ignores the page size and margin settings. Use Upload.

Will the text be selectable?

Yes, if you use the Upload tab — the document goes through your browser's print engine, so the text remains text and the PDF is searchable and accessible. The Paste tab produces an image, where it is not.

My page lost all its styling.

The HTML file references its stylesheets, images and fonts rather than containing them, so if you moved only the .html file those links broke. Save the complete page, which produces a folder of assets alongside the file, and keep both together — or use a self-contained file with everything inlined.

My charts and dynamic content are missing.

Because a saved HTML file contains the markup, not the result of running its scripts. For content built by JavaScript, open the page in your browser, let it load fully, and press Ctrl+P to save as PDF — same engine, and it captures the finished state.

Do background colours print?

Yes. Browsers normally strip backgrounds when printing to save ink, which ruins a designed document. This sets the instruction telling the browser to print colours exactly as designed, so you do not have to find the Background graphics checkbox yourself.

Why not just use Ctrl+P?

If the page is already open in your browser, do — it is the same print engine and it captures the page exactly as it is, scripts included. This tool is better when you have an HTML file rather than a live page, want consistent page settings without configuring the dialog each time, or are converting several files.