Skip to content

HTML to PDF Converter

Turn HTML into a PDF with selectable text using your browser’s Save as PDF, with a safe preview and page size, orientation and margins.

Runs in your browserHTML → PDF
Loading tool…

How to use the HTML to PDF Converter

  1. Paste HTML (a full page or a fragment) or open an .html file. Inline <style> blocks and remote stylesheets are applied.
  2. Pick the page size, orientation and margin, then press "Save as PDF". In the print dialog choose "Save as PDF" (Chrome, Edge, Firefox, Safari) or "Microsoft Print to PDF" as the destination.
  3. The PDF is produced by your browser’s own print engine, so text stays real text: selectable, searchable and sharp at any zoom.
  4. Turn on "Background graphics" in the print dialog too if coloured backgrounds are missing, and turn off "Headers and footers" for a clean page.

Privacy and limitations

  • Your data is processed on your device and is not uploaded to any server.
  • JavaScript in the HTML is removed and never runs, so pages that build their content with scripts print empty or incomplete.
  • Relative links to images and stylesheets cannot be resolved; use absolute https:// URLs or data: URIs. Forms, iframes and embedded objects are removed.
  • Page size and margins are applied via CSS @page, which some browsers (notably Safari) only partly support; the print dialog settings may take precedence.
  • The exact rendering depends on your browser; there is no server-side engine for pixel-identical PDFs.

Frequently asked questions

Is my HTML uploaded to a server?

No. The HTML is sanitised and printed entirely in your browser; nothing is sent anywhere. Scripts are removed and never run.

Why is my page size or margin ignored?

The settings are applied with CSS @page rules. Chrome and Edge follow them fully; Firefox and Safari may keep the paper size chosen in the print dialog, so set it there as well.

Browse all html converters →