ToolConvoyToolConvoyv2.6
DOC

HTML to PDF — Convert HTML Files to PDF in Your Browser

Convert HTML files or snippets to PDF. Preserves styles, page breaks, and print rules, runs entirely in your browser. No uploads, no limits.

● LOCAL · DOCS NEVER LEAVE DEVICE0 network requests since page load

HTML to PDF

Convert HTML files to PDF documents. Works entirely in your browser — no uploads, no limits.

Drop your HTML file here

or click to browse (max 50MB)

HTML to PDF is one of those conversions that has had a dozen different solutions over the years, none of them perfect. The challenge is that HTML is a flowing, responsive medium — content reflows to fit the viewport, and the author delegates layout decisions to the browser — while PDF is a fixed-coordinate medium where every glyph has an exact position on an exact page. A good HTML-to-PDF tool needs to make the same layout decisions that a browser does for screen rendering, then pin everything to a coordinate grid that paper can hold. The tool here uses the same rendering pipeline that powers Chrome’s Print dialog, which is the de facto reference implementation for this problem on the web.

The non-obvious thing about HTML-to-PDF is the print stylesheet. Most authored HTML has a @media print block that hides navigation, removes backgrounds, and reformats for paper. When that block exists, the PDF output is clean and predictable. When it does not exist, the PDF output includes everything visible on screen — sidebars, sticky headers, hover effects that are now static, animations frozen at frame zero. The right preparation for HTML-to-PDF is to either author a print stylesheet or to add a ?print parameter that swaps in a print-friendly version before converting.

For a final hand-off: if the goal is a faithful rendering of an existing web page, author the print stylesheet first — a few dozen lines of CSS that hide the parts that do not belong on paper. If the goal is a quick conversion of an HTML snippet from a chat or an email, the tool produces a usable PDF in seconds with the screen layout. If the goal is a long-term archive of a web page, save the original HTML and the assets alongside the PDF — the HTML is searchable, editable, and version-control-friendly, while the PDF is a snapshot frozen at conversion time.

How to use

  1. Paste HTML or load a file

    Paste raw HTML into the editor, load an .html file, or point at a URL (when network allows). The tool preserves the source's styles, scripts are stripped for safety, and external CSS is inlined when reachable.

  2. Pick page settings

    Choose A4 or Letter, portrait or landscape, and a margin preset. Toggle the option to honor CSS `@page` rules and `page-break-before` properties from the source — most authored HTML uses these for natural print breaks.

  3. Download the PDF

    The renderer lays out the HTML and produces a PDF that matches what Chrome's Print dialog would produce for the same source. Page count and file size are shown above the download button.

Frequently asked

Will CSS @media print rules be honored?

Yes — the renderer uses the print stylesheet when laying out. If your HTML has a `@media print` block that hides navigation or reformats for print, those rules apply. If no print stylesheet exists, the screen stylesheet is used and the output may include navigation, sidebars, and other elements you would not want on paper.

Are external stylesheets and images loaded?

Does it run JavaScript in the page?

By default, scripts are stripped before rendering for safety and to keep the output deterministic. A single render pass with no JS produces a stable PDF; if your page depends on JS to lay out (React apps, Vue SPAs), the static HTML before hydration is what renders.

Can I control page breaks?

Yes — add `page-break-before: always` (or the modern `break-before: page`) to any element to force a page break there. The renderer honors both the legacy CSS 2.1 syntax and the CSS Fragmentation Module Level 3 syntax.

What fonts are used in the PDF?

System fonts available on the rendering machine are used. Web fonts hosted via `@font-face` from a reachable URL are downloaded and embedded. If a font is unavailable, the browser substitutes a metric-equivalent fallback — the layout may shift slightly.

Limitations

  • No JavaScript executionScripts are stripped before rendering. SPAs that depend on JS to render content (React, Vue, Angular without SSR) produce a PDF of the empty pre-hydration shell. Server-rendered HTML or static pages are the right input.
  • External assets must be reachableExternal CSS, images, and fonts are fetched from the network during render. Pages hosted behind authentication, on `localhost`, or behind firewalls produce incomplete output. Inline the assets or host them on a public URL before converting.
  • Print stylesheet assumedWithout a `@media print` block, the screen layout is used and may include navigation, sidebars, or hero images that are not appropriate for paper. Add print styles or strip unwanted elements before converting.

Platform notes

macOS
Safari's File > Export as PDF uses a similar renderer to this tool. The browser tool is the right pick when the source HTML is in a chat, an email, or a CMS export and opening Safari's print dialog is not worth the setup time.
Windows
Microsoft Edge's Print dialog uses the same Chromium renderer that powers this tool. The browser tool is the right pick when the source is HTML in an email or a CMS export and a quick conversion without printing through Edge is preferred.
Linux
For command-line work, `wkhtmltopdf input.html output.pdf` and Chromium's headless mode (`chromium --headless --print-to-pdf=output.pdf input.html`) are the closest equivalents. The browser tool is the right pick for one-off conversions of HTML pasted from chat or email.
Web
Runs entirely client-side. Works offline once the page has loaded. Useful for restricted environments where installing a CLI tool or a headless browser is not an option.