HTML to PDF
Paste HTML or open an HTML file, choose the page setup and save it as a PDF. Text stays real and selectable.
- Paste HTML or open an HTML file
- Choose paper size, orientation and margin
- Click Save as PDF and choose Save as PDF in the print window
Your files never leave your device
How to turn HTML into a PDF
Paste HTML code or open an HTML file, choose the paper size, orientation and margin, and press Save as PDF. A live preview shows how the page will look. Your browser then opens its print window, where you choose Save as PDF as the destination, and because the print engine creates the file, the text stays real and selectable.
- Scripts in the HTML do not run; the preview shows the static page.
- Images and styles that point to other websites load only if those sites allow it.
- Use CSS such as page-break-before to control page breaks.
A worked example
Paste a small invoice made of a heading and a table with a few rows, choose A4 portrait and a medium margin, and check the preview. If a long table runs onto a second page, add the rule page-break-before: always to the heading of the next section so it starts on a fresh page. Press Save as PDF, pick Save as PDF in the print window, and keep the option for backgrounds on so that colored table headers are printed.
Limits and common mistakes
The preview is sandboxed, so scripts are disabled and content that a script would create does not appear. Images from other websites may not load if those sites block it, so embed small images as data addresses. If background colors vanish in the PDF, enable background graphics in the print window. Keep the CSS simple and test with a small page first.
Frequently asked questions
Is my HTML uploaded?
No. It is rendered and printed in your browser, and nothing is sent to our servers.
Will the text be selectable?
Yes. The PDF is made by the browser's print engine, so text stays real and can be searched and copied.
Do scripts run?
No. The preview is sandboxed and scripts are disabled, so only the static page is converted.
Why does a print window open?
Your browser creates the PDF. Choose Save as PDF as the destination instead of a printer.
Can I include images?
Yes, with data: addresses or links to sites that allow it. Images from sites that block other pages will not appear.
Can I keep background colors?
Yes. Keep the background option on and enable background graphics in the print window if asked.