The preview is a sandboxed iframe. When you click Open & print to PDF, the same HTML opens in a new tab and the browser's print dialog appears.

How it works

  1. Edit or paste a full HTML document on the left.
  2. The sandboxed preview renders live as you type.
  3. Click Open & print to PDF — a new tab opens with your HTML and the print dialog.
  4. Choose Save as PDF as the destination and save.
Tip: use @media print CSS to hide navigation, reset margins, and force page breaks with page-break-before: always.

Use cases

  • Invoice generation — templated billing documents.
  • Report creation — turn a dashboard HTML snapshot into a share-ready PDF.
  • Certificate printing — personalized certificates at scale.
  • Document archiving — save rendered reports with fixed layout.

Custom page sizes and margins

Include a @page rule in your CSS to control paper size and margins:

@page {
  size: A4;
  margin: 20mm 16mm;
}

Need just an image? Try HTML to Image for a raster PNG export.