Skip to main content
DevTool House

HTML to PDF

HTML to PDF converter

About HTML to PDF

Paste HTML or upload an .html file and get back a real PDF — rendered by a headless Chrome browser on the server, so your CSS, tables, and backgrounds print the way a browser draws them. Choose the page size, orientation, and margins before you download.

Last reviewed

August 3, 2026

Key Features

  • Renders with headless Chrome so CSS, tables, and layout print as the browser shows them
  • A4, Letter, or Legal page size in portrait or landscape
  • Margin presets (none, small, normal) and a print-background toggle
  • Paste markup directly or upload an .html/.htm file up to 2MB
  • Optional side-by-side preview, plus render time and PDF size after each conversion

How to Use HTML to PDF

  1. 1Paste your HTML into the editor, or upload an .html/.htm file up to 2MB.
  2. 2Choose page size, orientation, margin preset, and whether to print background colours and images.
  3. 3Open the preview pane to sanity-check the layout before rendering.
  4. 4Click Convert to PDF — the finished document downloads automatically.

Invoice and report export example

Applications that already build HTML invoices, statements, or reports often need the same document as a PDF attachment. Paste the rendered HTML here, choose A4 with normal margins and print backgrounds enabled, and the download is a print-ready file you can email or archive — without installing a PDF library.

How It Works

The HTML is sent to the DevTool House service, loaded into a fresh isolated browser context, and printed with Chrome's own PDF engine using the page format, orientation, margin preset, and background setting you selected. Because Chrome performs the layout, the output is a real text-based PDF rather than a screenshot image, so the text stays selectable and searchable.

Privacy Notes

Rendering happens on the server, not in your browser, and the PDF is streamed straight back to you. Avoid submitting documents containing customer records, credentials, or confidential material. External resources that point at private or internal network addresses are blocked while the page renders.

Limitations

Rendering takes a few seconds because a real browser has to load your assets first, and a job that exceeds 30 seconds is cancelled — split very large documents into smaller ones. JavaScript is disabled unless you enable it, so script-generated content is missing by default. Assets must be reachable on the public internet. Rendering is also rate limited per visitor, so bulk conversion belongs in a build script rather than this page.

Frequently Asked Questions