HTML to PDF

The interactive tool loads here. JavaScript is required to use its controls; the instructions below are available without it.

Create a PDF from a trusted HTML file or pasted HTML markup. Browser conversion is the default. An optional LibreOffice engine uploads the HTML to our conversion server. Choose the processing method before converting and review the resulting pages.

How to convert HTML to PDF

  1. Replace the sample markup in Paste HTML, or select Upload HTML file and choose an .html or .htm file. This tool accepts markup or a file, not a webpage URL.
  2. Check the HTML preview and choose a conversion engine. For browser conversion, select A4 or Letter and a 10, 15 or 20 mm PDF margin.
  3. Set an output filename. If using LibreOffice, wait for the service connection check and follow the displayed upload limit.
  4. Select Convert & download. Open the PDF and inspect images, line wrapping and page boundaries; the HTML preview is not a paginated proof of the export.

Browser output and server output

Browser mode captures the rendered content as images inside a portrait PDF. Text is not exported as selectable PDF text, and large pages can become blurry or exceed canvas memory. A4/Letter and margin controls apply only to this mode.

LibreOffice processes the uploaded HTML on the server and may render layout differently. The browser page-size and margin controls are not sent to that engine. Check the downloaded document rather than assuming the two engines produce identical results. Its download name may come from the source HTML filename.

Make a self-contained HTML document

Start with a simple document containing its own styles and embedded images. A file on your device does not give the converter access to neighboring image or stylesheet files. External fonts and images may fail because of missing access, browser restrictions or unsupported styling.

For a printable receipt, use a simple heading, paragraphs and a table, then test long descriptions across page breaks. Complex web layouts, interactive widgets and JavaScript-generated content may not transfer. Only use HTML you trust; this converter is not an HTML sanitization tool.

Privacy, file limits and large pages

Browser mode does not upload your HTML to our conversion API, but referenced external resources can still make network requests during preview or rendering. Normal website requests also occur. Use embedded resources when you want to avoid fetching external images or fonts.

LibreOffice mode uploads the HTML when you select Convert & download. The hosted limit is currently 5 MB; follow the limit shown in the tool if configuration changes. Browser file input accepts up to 25 MB, although much smaller documents can still exceed your device memory during rendering. Shorten a large document and retry if necessary.

Frequently asked questions

Can I enter a webpage address?

No. Supply an HTML file or paste markup. Saving a webpage may not include its images, styles or generated content, so check that the supplied HTML is self-contained.

Why can I not select text in the browser-generated PDF?

The browser engine renders the HTML into images before making the PDF. It does not preserve the text as selectable PDF text.

Why do the preview and PDF differ?

The preview displays HTML in a browser frame, while export adds pagination and uses the selected engine. Missing assets, unsupported styling, margins and page boundaries can change the result.