HTML to PDF

Paste a full HTML document, preview it, and print as a PDF. Great for invoices, reports, certificates, and email templates.

Pro Tips for Better PDFs

  • Include @media print CSS for print-specific styles
  • Use page-break-before: always to control page breaks
  • Enable "Background graphics" in the print dialog for background colors
  • Set margin: 0 in print CSS if you want no browser margins

Frequently Asked Questions

Will CSS styles be preserved in the PDF?
Most CSS works — layout, colors, fonts, borders, and tables all render well. Background images may need 'Background graphics' enabled in the print dialog. Some complex CSS (animations, fixed positioning) behaves differently.
How do I control page breaks?
Use CSS properties: page-break-before, page-break-after, and page-break-inside. For example: h1 { page-break-before: always; } to start a new page before every h1.
Can I use Google Fonts in my HTML?
Yes — include the Google Fonts link in the <head> of your HTML. The print dialog renders the page as the browser sees it, so fonts load normally.
How do I remove browser headers/footers from the PDF?
In Chrome's print dialog, uncheck 'Headers and footers'. In Firefox, go to File → Page Setup → Headers/Footers and set all to blank.