When you need to convert HTML to PDF
HTML to PDF conversion is useful for developers generating invoices or reports from HTML templates, saving web page content as a permanent archived PDF, converting email template designs to PDF for review and approval, archiving web articles before they go offline, or sharing HTML-based documents with people who won't be viewing them in a browser.
How to convert HTML to PDF free — step by step
- Open ihatepdf.cv/html-to-pdf — no sign-up required
- Paste your HTML code into the editor, or upload a .html file
- Preview renders in real time showing how the PDF will look
- Click Convert to PDF and download — no watermark, no server upload
What CSS is supported?
Inline styles and embedded CSS inside a <style> tag are fully applied.
External stylesheets linked via <link> tags pointing to remote URLs also
work when you have an internet connection. For best results with complex layouts, inline all
your CSS before converting to ensure nothing depends on external resources.
Tips for better HTML to PDF output
- Use print CSS — add
@media printrules to hide navigation, ads, and interactive elements that shouldn't appear in the PDF - Set explicit page breaks — use
page-break-before: alwaysin CSS to control where pages split - Use pt or mm for fonts — these scale correctly for print; px can behave inconsistently across PDF engines
- Avoid fixed positioning —
position: fixedelements may not render as expected in PDF - Inline your web fonts — external CDN fonts may not render correctly if unavailable
Convert a saved webpage to PDF
Save a webpage as an HTML file (File → Save Page As → Webpage, Complete in your browser), then upload the .html file to the converter. This captures the rendered layout including all styles applied by the website's CSS.
Frequently asked questions
Does the converted PDF have a watermark?
No. ihatepdf never adds watermarks.
What about JavaScript in the HTML?
JavaScript is not executed during conversion. Content that requires JavaScript to display (dynamic charts, lazy-loaded images) may not appear in the PDF. For these cases, take a screenshot of the rendered page and use Images to PDF instead.