HTML to PDF
Paste HTML and get a PDF two ways: (1) Print Preview — opens your browser print dialog with the HTML rendered, pick Save as PDF for pixel-perfect output with CSS and fonts intact; (2) Text-PDF — extracts visible text and lays it out into a smaller vector PDF using pdf-lib.
"Open Print Preview" gives you the highest-fidelity result — your browser prints the HTML (with CSS, fonts, images) into a PDF via the OS print dialog. "Text-PDF" extracts visible text and lays it out into a smaller, vector-based PDF.
Rendered preview
How to use HTML to PDF
- Paste an HTML fragment or full document.
- Click Open Print Preview to use the browser's Save as PDF.
- Or click Download text-PDF for a small text-only output.
What is HTML to PDF?
The browser print path is the highest-fidelity option since your browser already knows how to render HTML+CSS — you just save the result. The text-PDF path is useful when you want a smaller, searchable archive without styling.
FAQ
- Why two output modes?
- Print Preview preserves CSS, fonts, images perfectly but requires the user's print dialog. Text-PDF is one-click but discards visual formatting.
- Does my HTML get sent anywhere?
- No — both paths run entirely in your browser.