HTML to PDF Converter

Paste or upload raw HTML code and convert it to a pixel-accurate PDF with full CSS rendering — ideal for developers testing invoice, email and report templates. Server-rendered for browser-faithful output.

CONVERT

HTML to PDF

Convert raw HTML code into a high-quality PDF document.

Drag & drop your PDF here
or click to select file

User Guide

1

Prepare the HTML

Anything the page needs must be reachable: stylesheets, fonts and images referenced by relative path will not resolve once the file is separated from its folder.

2

Upload or paste

Up to 10 MB. Rendering HTML means running a browser engine, so this happens on a server rather than in your own browser.

3

Convert

The markup is rendered and paginated as a browser would render it, then written to PDF with the styling applied.

4

Check where the pages break

HTML has no pages, so breaks are decided during rendering. Tables and long blocks are where awkward splits appear.

5

Control breaks with CSS if you can

page-break-inside: avoid on a block keeps it whole; page-break-before: always forces a new page. A little of this transforms a generated document.

6

Converting a live page instead?

Use URL to PDF, which fetches the page and its assets together rather than working from a file.

About the HTML to PDF Converter

This tool renders HTML and writes the result as a paginated PDF, with CSS applied. It is the standard way to turn something generated as a web page — an invoice, a statement, a report — into a document you can send or file.

The fundamental mismatch

HTML has no pages. It is a continuous document of unlimited length that reflows to whatever width it is given. PDF is the opposite: fixed pages of fixed size.

Conversion has to impose one on the other, and every quirk of HTML-to-PDF output comes from that. The renderer lays the page out at a notional width, then cuts it into page-sized pieces — and unless told otherwise, it will cut wherever the boundary happens to fall, including through the middle of a table row or a heading.

Controlling pagination

CSS has properties for exactly this, and they are the difference between a generated document that looks deliberate and one that looks automated:

CSS Effect
page-break-inside: avoid Keeps a block whole rather than splitting it
page-break-before: always Starts a new page at this element
page-break-after: avoid Keeps a heading with the text that follows
@media print { … } Rules that apply only when rendered to paper

A print stylesheet is worth writing if you generate documents regularly. Hiding navigation, removing background colours and keeping table rows intact takes a few lines and improves every document you produce thereafter.

Assets must be reachable

The most common failure is an HTML file that looks perfect locally and converts as unstyled text. The cause is nearly always relative paths: <link href="style.css"> or <img src="logo.png"> resolve against the file’s folder, and once the file is uploaded on its own that folder is not there.

Two fixes. Use absolute URLs for anything hosted, so the renderer can fetch it. Or inline everything — CSS in a <style> block and images as data URIs — so the file is genuinely self-contained.

What does not survive

PDF is static. JavaScript that builds content after load has no effect; convert the rendered output instead. Animations, transitions, video and interactive elements all flatten to their initial frame. Forms become pictures of forms.

Privacy

This conversion runs on a server rather than in your browser, because it needs software a browser does not have. Your file is sent over an encrypted HTTPS connection, converted, and deleted automatically after processing. The limit is 10 MB per file.

Frequently Asked Questions

Why did my PDF come out unstyled?

Relative paths. A stylesheet referenced as style.css resolves against the file’s folder, which no longer exists once the file is uploaded alone. Use absolute URLs, or inline the CSS in a style block.

How do I stop tables splitting across pages?

Add page-break-inside: avoid to the rows or the table. HTML has no pages, so the renderer cuts wherever the boundary falls unless CSS tells it otherwise.

Does JavaScript run?

Content built by JavaScript after load will not appear. Render the page first and convert the resulting markup, or use URL to PDF against the live page.

Can I control page size and margins?

Through CSS, with the @page rule and a print stylesheet. That is also where to hide navigation and remove background colours you do not want on paper.

What about images?

They are included if the renderer can reach them. Absolute URLs work; relative paths to files that were not uploaded do not. Data URIs always work because the image travels inside the HTML.

Should I use this or URL to PDF?

This one for an HTML file or markup you have. URL to PDF for a page that is live on the web, since it fetches the page together with its assets.

Are forms still fillable?

No. Interactive elements are rendered as they appear and become static. A PDF form would have to be built as a PDF form.

How big can the HTML file be?

10 MB, because rendering HTML requires a browser engine running on a server.