Convert
HTML to PDF
Convert your own HTML into a PDF with real, selectable text. Paste code or upload a file, set the page size and margins, and check the pages before you download.
Uploaded securely and deleted after processing
Opening HTML to PDF
Static HTMLHTML up to 30 MB, pasted or as one file
What HTML to PDF does
HTML to PDF renders static HTML and CSS on our server with a full browser engine and prints the result to PDF. It is built for documents you write or generate yourself, such as invoices, reports, letters and resumes, and it has a starter template for each.
The HTML must be self-contained. Scripts are not run and nothing is fetched from the internet, so styles have to be inline or in a style element, and images and fonts must be embedded as data URLs. That rule is what makes the output predictable: the PDF contains exactly what is in your file, whether or not a website is online.
Your HTML is uploaded when you generate, and the temporary copy is deleted when rendering ends. The preview shows the actual PDF, page by page. If you opt in, a draft of your HTML is saved in this browser for seven days.
Is this the right tool?
Good for
- Producing invoices or receipts from an HTML template your system fills in
- Turning a hand-written HTML report or letter into a print-ready PDF
- Checking how print CSS, page breaks and @page rules will paginate
- Making custom-size pages, such as a label or a ticket, with Custom dimensions
Not the right tool for
- A picture of your HTML for a social post or thumbnail. Render it to PNG or JPG instead.HTML to image
- Documents you would rather write in a word processor. Convert the DOCX and skip the markup.Word to PDF
- Building a resume. The Resume Builder has templates and exports PDF and Word without any code.Resume Builder
How to convert HTML to PDF
Add your HTML
Paste code into HTML source, select Upload HTML for an .html or .htm file up to 30 MB, or start from the Invoice, Report, Résumé or Letter template.
Clear the HTML checks
HTML checks lists anything that would block rendering, such as a script, an external image or a preload link, with a link to the line in your source.
Set the page
Choose Page size, Portrait or Landscape, Margins (mm) and Content scale (%).
Choose Appearance
Print styles applies your print CSS; Screen styles keeps the on-screen look. Leave Include background colors and images ticked if your design uses them.
Generate
Select Generate PDF and review the pages with the preview, thumbnails and zoom.
Download
Edit the document name and select Download PDF. Change the source and generate again as often as you need.
Worked example
An invoice template with a linked logo and web font
Say your billing script produces an HTML invoice that points to a logo on your website and a stylesheet from a font service. Paste it in, and HTML checks reports two resources to embed, each with its line number.
Convert the logo to a data URL and put it in the image's src attribute. Embed the font the same way inside an @font-face rule, or switch to a system font stack. The checks clear.
Choose A4, set Margins to 15 mm, keep Print styles and generate. The preview shows the totals box split across two pages. Add break-inside: avoid to that block in your CSS, generate again, and download an invoice whose totals stay together.
Tips for a better result
- To capture a live web page, use your browser's own Print, Save as PDF. This tool only renders HTML you supply.
- Use HTML page rules lets the @page size and margins in your CSS take priority. Changing a page setting in the panel switches it off.
- Use Content scale (%) to pull a slightly too-wide table back inside the margins without editing your CSS.
HTML to PDF: questions and answers
Why does the tool refuse HTML with external images or stylesheets?
The renderer has no internet access by design, so a linked image, font or stylesheet would simply be missing from the PDF. Instead of printing a broken page, the tool stops and lists each resource to embed. Convert images and fonts to data URLs, and paste linked CSS into a style element. Preconnect, prefetch and preload links are refused for the same reason, so delete them, and markup inside a template element is checked like the rest of the page.
Does JavaScript run during HTML to PDF conversion?
No. Scripts and event handlers do not run, so the output never depends on code or timing. If your page builds its content with JavaScript, open it in a browser, copy the rendered HTML from the developer tools and convert that.
How do I control page breaks in the PDF?
Use CSS. break-before: page starts an element on a new page, and break-inside: avoid keeps a block such as a totals box or a figure from being split. Generate the PDF and check the thumbnails; pagination is easier to tune by looking than by calculating.
Should I pick Print styles or Screen styles?
Pick Print styles if your HTML has an @media print block or was designed as a document; elements hidden for print stay hidden. Pick Screen styles when the PDF should match what you see in a browser window, including screen-only colors and layout.