Convert HTML files, web page URLs, or raw HTML code into PDF documents
Drop Your HTML File Here
HTML, HTM files • Max 10 MB
Public URLs only. JavaScript-rendered content may not appear.
Paste HTML
Directly paste and convert any HTML markup
Upload File
Upload .html or .htm files directly
From URL
Convert any public web page to PDF
CSS Support
Inline styles and external stylesheets supported
Convert raw HTML code, an uploaded .html file, or a live webpage URL into a downloadable PDF, with control over paper size and orientation.
How It Works
How HTML to PDF Works
Depending on the mode you choose, the tool takes HTML from one of three sources: HTML code pasted directly into the page, an uploaded .html/.htm file, or a live webpage fetched server-side by URL (with private/local network addresses blocked for security).
The resulting HTML is passed to Dompdf, a PHP library that parses standard HTML and CSS and lays it out the way a simplified browser engine would, supporting headings, paragraphs, tables, basic CSS styling, and remote images.
You choose the paper size (A3 through Legal) and orientation before rendering; Dompdf then produces the final PDF using those page dimensions, ready for immediate download.
Worked Example
See It In Action
Pasting the HTML for an internal invoice template — with inline CSS styling a header, an item table, and a totals row — and selecting A4 portrait produces a one-page PDF invoice that mirrors the pasted markup's layout and colors.
FAQ
Frequently Asked Questions
Can I convert a live webpage by just entering its URL?
Yes — switch to URL mode and enter any public web address; the server fetches the page's HTML directly and converts it. Local or private network addresses are blocked for security reasons.
Will complex CSS like flexbox or JavaScript-rendered content work?
Dompdf supports standard HTML/CSS layout (tables, floats, basic positioning) well, but it does not execute JavaScript and has limited support for modern CSS layout systems like flexbox or grid — simpler, more traditional markup converts most reliably.
What paper sizes are available?
A3, A4, A5, Letter, and Legal, in either portrait or landscape orientation — select whichever matches your target print or viewing format.