HTML to PDF Converter — Free
Convert HTML files with CSS to beautifully rendered PDFs. WeasyPrint-powered. Supports inline styles and base64 images. No signup.
MergeAny combines two or more JPG, JPEG, or PNG images into a single file directly in your browser — vertically, horizontally, or in a grid. There is no upload limit, no watermark, and your files are deleted from our servers seconds after merging. Works on Windows, Mac, iPhone, and Android with no install and no signup.
How to Convert HTML to PDF
Upload Your HTML File
Select an .html or .htm file up to 10 MB. Embed all CSS in a <style> block for best results.
WeasyPrint Renders It
WeasyPrint renders the HTML and CSS to a print-quality PDF layout server-side.
Download PDF
Click Convert to PDF and save your rendered HTML document as a PDF.
Tips for Best HTML to PDF Results
Since conversion runs server-side without internet access, all resources must be self-contained in your HTML file. Here are the key things to check before uploading:
- →CSS: Move all styles into a
<style>block in the<head>. External .css file links won't load. - →Images: Convert images to base64 data URIs using
src="data:image/png;base64,...". External image URLs won't load. - →Fonts: Use system-safe fonts (Arial, Georgia, Times New Roman) or embed font-face declarations with base64-encoded font data.
- →Page size: Use CSS
@page { size: A4; margin: 20mm; }to control page dimensions and margins in the output PDF.
WeasyPrint supports most CSS 2.1 and CSS 3 properties including flexbox, grid basics, page-break rules, and custom properties. It is an excellent choice for generating invoices, reports, and certificates from HTML templates.
HTML to PDF Conversion Features
Turn any self-contained HTML file into a print-quality PDF.
CSS Support
Inline CSS and <style> block styles are fully supported. Use any CSS properties for layout, typography, and color.
Base64 Images Supported
Embed images as base64 data URIs directly in your HTML — they will render correctly in the output PDF.
WeasyPrint Engine
WeasyPrint is a Python-based PDF rendering engine known for clean, spec-compliant CSS layout output.
Private Processing
Files are processed in isolated server memory and deleted immediately after download.
No JavaScript Execution
HTML structure and CSS styles are rendered. JavaScript is not executed — dynamic content won't appear.
Browser-Based
No installation required. Works on any device and operating system.