HTML to PDF Online Free
Paste HTML or open an .html file, check the preview and download a PDF. Invoices, receipts, reports and email templates come out with real, selectable text and clickable links, and nothing is uploaded.
About this tool
How to convert HTML to PDF
- Paste your HTML into the editor, or press Open .html file. A whole page with <style> works, and so does a fragment.
- If the HTML uses pictures or stylesheets saved next to it, such as logo.png or style.css, press Add files and select them. They are matched by file name. Stylesheets and pictures linked by a full web address load by themselves.
- Choose the page size, orientation and margins. For a page designed for a desktop screen, pick a wider Layout width; it is laid out at that width and scaled down to fit the paper.
- Press Convert to PDF and download. An opened file keeps its name, so invoice.html becomes invoice.pdf.
How the conversion works
Your browser lays the HTML out exactly as it would on screen, with your CSS: flexbox, grid, tables, fonts and colours. The converter then reads back where every word, box, border and picture ended up and writes each one into the PDF as real content. Text stays text, in a standard PDF font matched to your font's style, with each word stretched to the exact width it had on screen so lines and columns stay aligned.
That makes the PDF small, sharp at any zoom, searchable and copyable. Links stay clickable, links to an id on the same page jump inside the PDF, headings become bookmarks, and pages are split between lines and table rows rather than through them. Add break-before: page in your CSS wherever you want a new page to begin.
Good uses
- Invoices, receipts and quotations generated as HTML by your own app or script.
- Email templates and newsletters you want to send as an attachment or archive.
- Reports and documentation saved from a web page with Save page as.
Limits worth knowing
- No web addresses. Browsers do not let one page read another website, so this tool converts HTML you paste or open rather than a URL. Save the page from your browser first (Ctrl+S) and open the saved file, adding its folder's pictures with Add files.
- Scripts do not run. Content that only appears after JavaScript runs will be missing, because scripts are removed for safety.
- Visual effects such as gradients, shadows and rotated elements are left out or drawn flat. Background colours, rounded corners, borders, background pictures, inline SVG and list bullets are kept.
- Non-Latin text (Hindi, Gujarati, emoji, the ₹ sign) is placed as small pictures, so it prints correctly but cannot be searched.
Converting a document instead? Word to PDF and Markdown to PDF handle those formats directly.
Privacy
The HTML is laid out by your own browser in a sealed frame that cannot run scripts, and the PDF is written on your device. Nothing is uploaded to our server or anyone else's.
Frequently asked questions
Can I convert a website by its URL?
Not directly: browsers block one page from reading another site. Open the page, save it with Ctrl+S, then open the saved .html file here and add its pictures with Add files.
Is the text in the PDF selectable?
Yes. Each word is written as real PDF text, so you can search, select and copy it, and links remain clickable.
Will my CSS be used?
Yes. Styles in <style> tags, style attributes and linked stylesheets (from a web address, or added with Add files) are applied exactly as a browser applies them.
How do I control page breaks?
Add the CSS break-before: page (or page-break-before: always) to the element that should start a new page. Without it, pages break between lines and table rows.
Is my HTML uploaded?
No. The conversion runs entirely in your browser and nothing leaves your device.
Written and maintained by Nudge Systems, Surat
Last reviewed