Skip to content

HTML to PDF Converter

Turn an HTML file or pasted markup into a PDF whose text stays selectable and searchable, with working links and real tables. Nothing is uploaded.

Private · on device. Runs in your browser: your file is not uploaded. No sign-up.

Your HTML
Also works with a page saved from your browser
Your text stays text. This lays the document out and draws it with real fonts, so you can select, search and copy from the PDF, and links still work. Tools that screenshot the page produce a file you cannot search and that is several times larger. Nothing is uploaded: the conversion happens in this tab.

Two ways to convert HTML, and only one of them keeps your text

Almost every free HTML-to-PDF tool works one of two ways, and the difference determines what you get.

The server approach uploads your file to a machine running headless Chrome, which renders it and sends a PDF back. Fidelity is excellent, it is a real browser. The cost is that your document went to someone else's computer. For a blog post that is nothing; for an invoice, a payslip, a contract or an exported bank statement, it is a decision worth making deliberately rather than by default.

The screenshot approach runs in your browser, draws the page onto a canvas, and wraps that picture in a PDF. Nothing is uploaded, which is good. But the output is a photograph of a document: you cannot select a line, search for a word, copy an amount, or click a link, and a screen reader finds nothing at all. It is also large, a five-page text document that should be 40 KB routinely comes out at 2 MB.

This tool takes a third route. It parses the HTML locally, lays it out into pages, and draws the text with real fonts. You get selectable, searchable text, working links and a small file, without anything leaving your machine. The trade is CSS fidelity, and the next section is honest about exactly where that line falls.

What comes through, and what does not

Rather than making vague claims about "supporting HTML", here is the actual list.

Comes throughDoes not
Headings h1–h6, sized by levelExternal stylesheets and CSS classes
Paragraphs, line breaks, horizontal rulesColours, backgrounds and borders from CSS
Bold, italic, monospace, and combinationsFloats, grid, flexbox and absolute positioning
Ordered and unordered lists, nested, with correct numberingMulti-column page layouts
Tables with headers, borders and sensible column widthsAnything drawn by JavaScript after load
Links, as real clickable annotationsWeb fonts and non-Latin scripts
Blockquotes and preformatted code, indentation intactCharts rendered to canvas or SVG
Embedded JPEG and PNG imagesImages hosted on other domains
Inline font-weight and font-styleVideos, forms and interactive elements
page-break-before: alwaysHeaders and footers defined in CSS

If your document is text with structure, an invoice, a report, an export from a system, a saved article, documentation, a generated statement, the left column is the whole document and you will get an excellent result. If it is a designed marketing page whose appearance is the content, use your browser's Print → Save as PDF instead. That is a real browser rendering it, and no free web tool will beat it.

The details that usually go wrong

Converting HTML to a paged document is mostly a series of small decisions, and getting them wrong is what makes most converters' output look off. These are the ones this tool handles deliberately.

Long words do not run off the page. A URL, a hash, a long identifier, anything wider than the text column is broken across lines rather than disappearing into the margin.

Headings do not end up stranded. A heading that would fall at the very bottom of a page, with its text overleaf, is moved down to start the next page with its content.

Nested lists keep their structure. Sub-items are indented and get a different bullet, and a nested list is not swallowed into the text of the item containing it, a surprisingly common bug.

Ordered lists count properly, including a list starting at a number other than one.

Code keeps its indentation. Whitespace inside a pre block is the content, so it survives, and an over-long line is wrapped with its indentation carried onto the continuation.

Wide tables lose width where it hurts least. Every column keeps at least its longest word and the prose columns wrap, so a column of dates or amounts is not compressed to fit a column of prose, and the table never crosses the right margin. Merged cells span the columns they cover.

Hidden things stay hidden. Elements with display: none, a hidden attribute or aria-hidden are skipped, along with scripts, styles, navigation and forms, the page furniture nobody wants in a printed document.

Practical uses

Invoices and receipts from a system that only exports HTML. Common in older accounting and billing software. The table comes through as a table, and the total is still selectable text your accountant can copy.

Saving an article or documentation page for offline reading. Save the page from your browser, convert the file, and you have a searchable PDF a fraction of the size of a screenshot.

Turning generated reports into something to send. If a script or a tool produces HTML, pasting it into the box above gives you a paged document with page numbers.

Anything confidential. The whole reason this runs locally. If the answer to "would I email this to a stranger?" is no, it should not go to a conversion server either.

After converting

If the PDF needs to meet an upload limit, the PDF compressor will bring it down while keeping the text selectable, it detects that a document is text rather than a scan and refuses to flatten it into images. To combine the result with other documents, use merge PDFs, and if you are sending it onward, the metadata remover will strip the author and software fields first.

Frequently asked questions

Can I select and search the text in the PDF?

Yes, that is the point of this tool. The HTML is parsed and laid out with real fonts, so the output contains actual text objects. You can select it, search it, copy from it and let a screen reader read it. Converters that render the page to an image produce a file where none of that works, and where the file is typically five to ten times larger for the same content.

Is my file uploaded anywhere?

No. The conversion runs in this browser tab using your own machine. That matters more than it sounds for this particular tool, because the HTML people convert is usually an invoice, a contract, a report or an exported statement, documents you would not normally email to an unknown server. You can disconnect from the internet after the page loads and it still works.

Does it apply my CSS?

Only in part, and it is worth being clear about that. The document structure is honoured, headings, paragraphs, lists, tables, code blocks, images, quotes and rules all come through, along with bold, italic, monospace, links and inline font-weight and font-style. A full stylesheet with its own grid, colours, floats and positioning is not applied, because doing that faithfully means running a browser engine, which means a server. If pixel-exact CSS is what you need, your browser's own Print → Save as PDF will do it better than any free web tool.

What happens to my tables?

They stay tables. Merged cells (colspan and rowspan) cover the columns and rows they span, so a "Total" spanning three columns leaves its amount under Amount. Columns are measured from their content, the table never runs past the margin, and text-align from the cell, its class in your stylesheet or the align attribute is honoured, so amounts stay right-aligned. Header rows are detected, from a thead or from a first row of th cells, drawn shaded and bold, and repeated at the top of every page a long table continues onto.

Do links still work?

Yes. Each href becomes a real PDF link annotation, not just blue text, so it is clickable in any PDF reader. A link whose text wraps across a line break stays clickable on both lines. In-page anchors and javascript: URLs are ignored, since neither means anything in a printed document.

Will it handle Hindi, Chinese, Arabic or emoji?

Not properly, and it will tell you so rather than quietly producing rubbish. The fonts built into every PDF reader cover Latin scripts, including accented European text, plus common typographic punctuation. Anything outside that is replaced with a question mark and reported in a warning with a count and examples. For a document in a non-Latin script, use your browser's own print-to-PDF, which can embed the fonts your system already has.

What about images?

JPEG and PNG images embedded in the HTML as data URIs are included at full quality. Images that live on another website usually cannot be read by a page running in your browser, that is a security rule browsers enforce, not a limitation of this tool, so those are skipped and counted in a warning, with the alt text shown in their place.

Can I convert a live web page by URL?

No, and no purely in-browser tool can. Fetching another site's page from this one is blocked by the same security rule described above; any tool offering it is fetching the page on a server, which means the page, and any session it needs, passes through that server. Save the page from your browser first (Ctrl+S, or ⌘S on a Mac) and convert the saved file.

Is there a page limit?

No hard limit. The whole document is laid out in memory, so a very long file uses memory proportional to its length, but hundreds of pages are fine on an ordinary laptop. Keep the tab in the foreground while it works, since browsers throttle background tabs.