HTML to PDF
Paste HTML, choose a page size, and export as PDF. Uses your browser's print-to-PDF — fully private, no uploads.
Tip: in the print dialog, choose "Save as PDF" as the destination. Headers/footers and "Background graphics" can be toggled there too.
Print-ready PDFs from any HTML
Whether you're producing invoices, certificates, contracts, tickets, or simply a print-ready version of a web page, our HTML to PDF converter uses your browser's native print engine to generate a crisp, vector-quality PDF — no servers, no uploads, no watermarks. The result is identical to what you'd get from File > Print > Save as PDF, but driven by a clean preview you control.
How the converter works
The tool wraps your HTML in a clean print stylesheet, applies the page size, orientation, and margins you choose, then opens the browser's print dialog targeted at Save as PDF. Because the rendering happens locally, you can use any web font, embed images, render SVG charts, and apply gradients — they all carry over perfectly into the PDF.
Common use cases
- Invoices & receipts. Generate dynamic, branded PDFs from order data.
- Certificates & tickets. Issue downloadable, printable proof of completion or attendance.
- Reports & statements. Turn an HTML dashboard into a paginated, printable document.
- Resumes & portfolios. Maintain a single HTML source of truth and export to PDF for applications.
- Manuals & eBooks. Use HTML for source, PDF for distribution.
CSS tips for print
Print-friendly CSS uses @page for margins, page-break-before / page-break-afterfor forced breaks, and page-break-inside: avoid to keep headings with their following content. Specify font sizes in pt instead of rem for consistent print sizing. Hide UI elements like nav bars with @media print { .nav { display: none; } }. Save dark backgrounds for screens — they look messy in print and burn ink.
Browser-based vs server-based
Server-based PDF generators like Puppeteer or wkhtmltopdf give you the same fidelity, but they require infrastructure, cost money to run at scale, and send your data to a server. For most cases — invoices, certificates, one-off reports — the browser is the simplest, fastest, and most private option.
Page size, orientation, and margins
The converter ships with the four sizes you'll actually use: A4 (most of the world),Letter (US/Canada), Legal (long contracts), and A5 (booklets and half-page handouts). Pair them with portrait or landscape orientation and three margin presets — narrow (0.5in), normal (0.75in), or wide (1in). For pixel-perfect control you can override the underlying@page rule directly inside your HTML, since the converter respects any print CSS you provide. Always preview before saving: a one-character mistake in margins or orientation is much cheaper to spot in the print dialog than after you've emailed the PDF to a client.
Frequently asked questions
Common questions about the html to pdf converter.
Does the output preserve fonts and gradients?
How do I force a page break?
Why does my PDF look smaller than expected?
Are the converters really free?
Do my files get uploaded to a server?
Which browsers are supported?
More converters
CSS to Tailwind
Convert raw CSS rules to Tailwind utility classes for quick migration or learning.
HTML to Word
Export styled HTML as a .doc file that opens in Microsoft Word, Pages or Google Docs.
HTML to PNG / JPG
Render HTML markup as a PNG or JPG image — perfect for OG images, social cards, and screenshots.
Text to HTML
Convert plain text to clean, semantic HTML — escapes special chars, wraps paragraphs, auto-links URLs, supports markdown lite.