📝 Free Online Tool
HTML to PDF Converter
Paste your HTML code, preview it live, set the page options — download a clean PDF in seconds. No signup, nothing uploaded.
Your HTML
Tip: inline
<style> works. External stylesheets and web fonts may not render in the PDF.Live preview
Advertisement
Free HTML to PDF Converter — Code In, PDF Out
Turn any HTML snippet into a polished PDF without leaving your browser. Write or paste markup, see exactly how it will look in the live preview, then export with your choice of page size, orientation and margins.
⚡ Instant Preview
Every keystroke re-renders the preview, so there are no surprises in the final PDF.
📐 Print-Ready Pages
A4, Letter or Legal — portrait or landscape — with adjustable margins from 0 to 30 mm.
🎨 Inline Styles Work
Use <style> blocks and inline CSS for colours, fonts and layout.
🔒 100% Private
Conversion happens locally with html2canvas and jsPDF. Your code never leaves your device.
How to Convert HTML to PDF
- Paste your HTML into the editor (or click Load sample to try it out).
- Check the live preview on the right — it shows exactly what the PDF will contain.
- Choose page size, orientation and margin, and set a file name.
- Click Convert to PDF and the file downloads automatically.
Frequently Asked Questions
Is my HTML uploaded to a server?
No. The page is rendered and captured entirely in your browser using html2canvas and jsPDF. Nothing is sent anywhere.
Do external CSS files and web fonts work?
Inline
<style> blocks and inline styles work reliably. Linked stylesheets and remote web fonts may not load inside the sandboxed preview, so prefer inline CSS for PDF output.What if my HTML is longer than one page?
Long content is automatically split across as many pages as needed, using the page size and margins you selected.
Is the PDF text selectable?
The PDF is generated from a rendered image of your HTML, so text is not selectable. For selectable text, use your browser's Print → Save as PDF on a styled page instead.