Convert HTML files, URLs, or raw HTML/CSS code to PDF online - free, no signup. Full CSS3 support with WeasyPrint: Flexbox, Grid, @page rules, web fonts. Desktop, tablet, or mobile rendering.
HTML to PDF Converter | Webpages & HTML Files Free | utilAZ
Convert HTML files, URLs, or raw HTML/CSS code to PDF online - free, no signup. Full CSS3 support with WeasyPrint: Flexbox, Grid, @page rules, web fonts. Desktop, tablet, or mobile rendering.
PDF Settings
One URL per line. Each will be converted to a separate PDF.
Three Input Methods, One Perfect PDF
Choose how to provide your HTML content based on your workflow
Paste a Web Address
Enter any public URL and our server fetches the complete page with all styles, images, and fonts for conversion.
Best for: live web pages, published reports, online articles
Upload HTML Files
Drag and drop .html or .htm files from your computer. Linked stylesheets and images with relative paths are resolved.
Best for: local templates, email archives, saved pages
Write or Paste HTML
Use the built-in code editor to write HTML and CSS directly. Full syntax highlighting with live preview available.
Best for: custom documents, dynamic templates, testing
CSS Rendering Capabilities
Our WeasyPrint engine delivers print-quality rendering of modern CSS features that other HTML-to-PDF tools often fail to handle correctly.
Flexbox
Full flex container and item properties
CSS Grid
Grid templates, areas, gap, spanning
Custom Properties
CSS variables with fallback values
Web Fonts
@font-face, Google Fonts, WOFF2
@page Rules
Page size, margins, named pages
Page Breaks
break-before, break-after, avoid
@media print
Print-specific style overrides
Gradients & Shadows
Linear, radial, box-shadow
Note: JavaScript-rendered content (React, Vue, Angular SPAs) requires the URL mode where our server fetches the rendered page. Code mode processes static HTML only. For single-page apps, ensure server-side rendering is enabled or use a pre-rendered URL.
Page Configuration Options
Page Sizes
Additional Settings
Common Use Cases for HTML to PDF
Invoice and Receipt Generation
Design invoices in HTML/CSS for pixel-perfect control over layout, branding, and typography. Convert to PDF for sending to clients as professional payment documents that print consistently.
Report and Documentation Export
Generate dynamic reports from data dashboards, analytics tools, or CMS platforms. Export HTML report views as PDF for offline distribution, archival, or board presentations.
Contract and Legal Document Templates
Maintain legal document templates in HTML for easy version control and dynamic field population. Convert to PDF for signing and filing with consistent formatting across all systems.
Email Newsletter Archiving
Save HTML email campaigns as PDF for record-keeping, compliance, or portfolio purposes. Captures the email layout exactly as rendered including images and styling.
Web Page Preservation
Archive web pages as PDF documents before they change or disappear. Useful for legal evidence, research citations, competitive analysis, or personal bookmarking of important articles.
Resume and CV Generation
Build resumes with HTML/CSS for complete design freedom. Convert to PDF ensuring fonts, spacing, and layout are preserved regardless of what device the recruiter uses to view it.
CSS Tips for Better PDF Output
Use @page for page-level control
@page { size: A4 landscape; margin: 2cm; }
Sets document page size and margins directly in CSS without needing UI options.
Control page breaks
.section { break-before: page; }
.keep-together { break-inside: avoid; }
Force sections to start on new pages or prevent elements from splitting across pages.
Hide elements from PDF output
@media print { .nav, .sidebar, .no-print { display: none; } }
Use @media print to hide navigation, ads, or interactive elements that should not appear in the PDF.
Running headers and footers
@page { @bottom-center { content: "Page " counter(page) " of " counter(pages); } }
Add automatic page numbers, dates, or custom text to every page margin.
Technical Specifications
| Rendering Engine | WeasyPrint (Python-based, CSS Paged Media compliant) |
| Input Types | URL, .html/.htm file upload, raw HTML/CSS code |
| CSS Support | CSS3 including Flexbox, Grid, Variables, @page, @media print |
| Font Support | System fonts, Google Fonts, @font-face (WOFF, WOFF2, TTF, OTF) |
| Image Formats | PNG, JPEG, SVG, GIF (embedded from external URLs) |
| Page Sizes | A3, A4, A5, Letter, Legal, or custom dimensions |
| Output Quality | Vector text, embedded fonts, high-resolution images |
| JavaScript | Not executed (static HTML rendering only in code/file mode) |
| Processing | Server-side, typically 2 to 10 seconds depending on complexity |
Frequently Asked Questions
How to convert HTML to PDF for free?
Upload your HTML file, paste HTML code, or enter a URL. Configure page size and margins, click convert, and download your PDF. Free with full CSS rendering, no signup, no watermark.
Can I convert a website to PDF?
Yes. Enter any public URL and the tool fetches the page with full CSS, images, and fonts, converting it to PDF with formatting preserved. Pages behind logins cannot be accessed.
How to save a webpage as PDF with formatting?
Enter the webpage URL in the converter. The tool renders the page with all CSS styles, fonts, images, and layouts intact, producing a PDF that preserves the visual formatting exactly as displayed.
Does HTML to PDF preserve CSS styles?
Yes. Supports CSS3 including Flexbox, Grid, custom properties, web fonts, media queries, gradients, shadows, and transforms. The WeasyPrint engine handles modern CSS accurately for print-quality output.
How to convert HTML to PDF with images?
All publicly accessible images in img tags or CSS backgrounds are automatically fetched and embedded. The output PDF is fully self-contained and viewable offline with all images at original quality.
Does the HTML to PDF converter support JavaScript?
URL Mode fetches and renders the page including JavaScript-rendered content, making it compatible with React, Vue, Angular, and other SPA frameworks. File Mode and Code Mode render static HTML only. For SPAs, use URL Mode or ensure server-side rendering is enabled.
