HTML to PDF Converter
Upload an HTML file or paste HTML, preview it, then save a clean PDF using your browser. Your HTML stays on your device.
0 chars · 0 B
Drop an HTML file, or browse
.html or .htm · up to 10 MB
Prefer to paste? Switch to .
Your preview will appear here
Upload an HTML file, paste HTML, or load the sample to see a secure, rendered preview.
Document settings
To hide the browser’s own date/URL stamps, turn off “Headers and footers” in the print dialog.
Opens your browser’s print dialog — choose Save as PDF as the destination.
Sharp, selectable text
Exports through the browser’s print engine, so text stays selectable and searchable and links stay clickable — not a flattened image.
Secure preview
Your HTML renders in an isolated, sandboxed iframe with scripts disabled. The preview reflects your chosen page size and margins.
Private by design
Everything runs locally in your browser. Your HTML is never uploaded to ConvertForge.
How to convert HTML to PDF
- Upload an .html / .htm file, or paste HTML code.
- Review the secure live preview.
- Choose paper size, orientation, margins, and print settings.
- Select Print / Save as PDF.
- Choose Save as PDF in the browser’s print dialog.
Features
- HTML & HTM file upload
- Paste HTML code
- Local, in-browser processing
- Secure sandboxed preview
- Live preview with page settings
- A4, Letter, Legal and A3
- Portrait & landscape
- Preset or custom margins
- Background color & image printing
- Sharp, selectable, searchable text
Privacy — your HTML stays in your browser
Private by design — your HTML is processed locally in your browser and is not uploaded to ConvertForge. Uploaded files are read with the browser File API, sanitized, and rendered inside an isolated, sandboxed iframe with scripts disabled, then printed through your browser’s native print engine. HTML that references external images, fonts, or styles may contact third-party servers only when you enable “Allow external resources”.
Browser compatibility
Works in current versions of Chrome, Edge, Firefox and Safari. Because each browser has its own print engine, exact page breaks, margins and scaling can differ between browsers — output won’t be byte-for-byte identical everywhere. If backgrounds are missing, enable background graphics in your browser’s print dialog.
Frequently asked questions
Does ConvertForge upload my HTML?
No. Your HTML file is read, sanitized, previewed and printed entirely in your browser. It is never sent to ConvertForge or any server.
Why does the browser print dialog open?
The tool uses your browser’s native print engine, which produces sharp, selectable, searchable text and clickable links — far better than a flattened screenshot. Choose "Save as PDF" as the destination to export.
Can I convert a website URL directly?
No. This tool converts HTML you paste or an .html / .htm file you upload — not arbitrary webpage URLs.
Are JavaScript scripts supported?
No. For your safety, <script> tags, inline event handlers and javascript: links are stripped and never run in the preview or the printed document.
Will external images appear?
Only if you enable "Allow external resources". When enabled, your browser may contact third-party servers to load those images, fonts or stylesheets. When disabled (the default), remote references are removed so nothing leaves your device.
Why do page breaks differ between browsers?
Each browser has its own print engine and pagination rules. The tool adds sensible page-break hints, but exact breaks and margins can vary between Chrome, Edge, Firefox and Safari.
Can I convert a complete HTML file?
Yes. Full documents with <html>, <head>, <style> and <body> are supported, and so are bare fragments — a fragment is wrapped in a valid document automatically.
Can I use custom CSS?
Yes. Your <style> blocks and inline styles are preserved. The tool only adds safe defaults (so images and tables don’t overflow the page) which your own CSS can override.
Is the text in the PDF selectable?
Yes. Because export uses the browser’s print engine rather than an image capture, text stays selectable and searchable and links remain clickable, wherever the browser supports it.
Why are browser headers or footers appearing?
Those date/URL stamps come from your browser, not from ConvertForge. In the print dialog open "More settings" and turn off "Headers and footers" to remove them.
Related tools
Live webpage URL conversion is coming soon.