Skip to main content

HTML to PDF converter

Convert HTML pages to PDF

No watermarkFree & unlimited
All processing happens in your browser. No data is sent to any server.

Your markup is parsed into a live element inside this page, laid out in a column 210 mm wide, and photographed by html2canvas at double resolution before jsPDF writes the capture into A4 sheets with 15 mm margins. Because the browser does the layout, style blocks in the file are honoured and the typography is the real thing. Two limits follow from the same mechanism: scripts inserted this way never execute, so anything a page builds with JavaScript is absent, and the finished PDF holds page images rather than a text layer.

Key facts about HTML to PDF converter

Key facts about HTML to PDF converter
InputA local .html or .htm file. There is no URL field, so a live web page cannot be fetched and converted here.
CSSStyle elements inside the file are applied by the browser, so inline and embedded stylesheets affect the result.
JavaScriptNever runs. Markup assigned this way cannot execute scripts, so client-rendered content does not appear.
External assetsImages and stylesheets load only if their host allows it; html2canvas is set to use CORS and skips what it cannot read.
Text layerNone. The pages contain a JPEG at quality 0.98, so the PDF is not searchable and links are not clickable.
Capture scalehtml2canvas renders at scale 2, about 192 DPI relative to the 210 mm column, which suits screen reading.
Page sizeA4 portrait with 15 mm margins. There is no landscape option and no Letter option on this converter.
Layout widthThe container is capped at 210 mm, so a design built for a 1440 px viewport is compressed rather than scaled.
PositioningFixed and sticky elements, and viewport units, resolve against the capture box rather than a real window.
Embedded mediaIframes and video cannot be captured. Where they appear, the PDF shows empty space or a poster frame.
Page breaksThe capture is one tall bitmap sliced into A4, so breaks ignore headings, rows and paragraph boundaries.
BatchUp to twenty HTML files per run, with multiple results packed into a ZIP inside the page.

What happens to your file

The file is read as text with the File API and assigned into an element belonging to this tab, so your markup is never posted anywhere. html2canvas walks that live DOM and paints it into a canvas locally, and jsPDF assembles the PDF in memory before handing back a Blob. The only network traffic that can occur is caused by your own document: an img tag or a stylesheet link pointing at a remote host will be requested by the browser as usual. A file with no external references generates no requests at all.

About this tool

  1. 1

    Save the page locally

    Export or save the HTML to a file first. This converter reads a file from disk and has no address bar.

  2. 2

    Inline what matters

    Move critical CSS into a style block and embed images as data URIs so nothing depends on a remote server.

  3. 3

    Convert

    The markup is laid out at 210 mm, captured at double scale and written into A4 pages by jsPDF.

  4. 4

    Review the breaks

    Scroll the PDF and check where pages split, since the slicer has no knowledge of your document structure.

  5. 5

    Download

    Save the file, or collect a batch of converted pages as one ZIP built locally in the browser.

Specs & compatibility
Input and outputTakes .html and .htm (text/html) and returns the PDF as a blob with the application/pdf type, named after the file you dropped in.
EngineYour markup is assigned to a hidden container's innerHTML and html2pdf.js 0.14.0 rasterises that container with html2canvas at scale 2 into an A4 jsPDF page set.
ModesFile mode only: HTML to PDF has no paste box, so the HTML arrives through the picker or a drag and drop and the PDF comes back as a download.
Batch and capsTwenty HTML files per run at 500 MB each; several PDF results are zipped in page memory as converted-pdf-files.zip.
Browser and deviceThe PDF comes from rasterising a hidden DOM node, so the ceiling on HTML to PDF is device memory, not a browser version - every current browser runs it and phones run out first on a long document.
  • Design for the paper width. A stylesheet with a fixed 1200 px container will be squeezed into 210 mm, so add a print-friendly max-width before converting.
  • If the page depends on JavaScript to render its content, open it in a browser, copy the resulting DOM from the developer tools and save that as your input file.
  • Remote images that lack CORS headers are dropped silently. Converting them to data URIs first is the reliable fix.
  • Web fonts loaded from a third party may not be ready when the capture runs. Embedding the font or falling back to a system stack gives a predictable result.
  • For a searchable PDF, print to PDF from your browser instead. That path keeps a text layer; this one always produces page images.
  • Turn an exported invoice, report or certificate template into a fixed PDF without sending customer data to an online renderer.
  • Archive a saved web page or documentation export as a paginated document that will still look the same in five years.
  • Produce a PDF from a locally generated HTML report inside a network where uploading the file is not permitted.
No. The tool reads a file you choose from disk, and it has no address field or fetching stage, partly because most sites would block a cross-origin request anyway. Save the page first with your browser save command, or export it from whatever produced it, then drop that .html file onto the converter.
Almost always because it was produced by JavaScript. Markup assigned into an element does not execute scripts, so charts, tables and widgets that a framework renders at runtime never exist in the captured DOM. Iframes and video elements cannot be captured either. Save a fully rendered copy of the DOM and convert that file instead.
No. html2canvas paints the laid-out page into a bitmap and jsPDF places that bitmap on the sheets, so the document contains an image rather than text operators. Selection, search, copy and screen readers all fail. If you need a text layer, use your browser own print-to-PDF function, which keeps the text and honours print stylesheets.
Style blocks inside the file do apply, because the markup becomes part of a real document that the browser lays out normally. External stylesheets apply only if the host serves them successfully. What does not apply is print-specific CSS: the capture happens in screen mode, so at-page rules, page-break-inside and print-only media queries are ignored.
Not from this converter. It is configured for A4 portrait with 15 mm margins and offers no page-setup controls. A wide layout is therefore compressed into the 210 mm column. If the content is genuinely landscape, such as a broad table, restructure it or produce the PDF from a tool that exposes page orientation.
The whole document is captured as one tall image which is then divided into A4 sheets at fixed intervals. The slicer sees pixels, not elements, so it cannot avoid splitting a heading, a table row or a figure. Adding blank space before the elements you want to keep together is the only lever available from the input side.
View all

Updated

We use anonymous analytics to improve ToolChamp. No personal data is stored or sold. Privacy Policy