Convert to PDF
HTML to PDF
Paste HTML code (or text) or choose an .html file: the page is laid out in your browser and saved as a PDF. No script is run and nothing is loaded from the internet.
How to use this tool
- 1
Paste your HTML code or text, or choose an .html file.
- 2
Set the page size, orientation and margins.
- 3
Click “Create the PDF” and wait while the pages are laid out.
- 4
Browse the page preview, then download the PDF.
Help
- Paste your code or text, or drop an .html, .htm or .txt file (5 MB at most). Choose the page size (A4 or Letter), the orientation and the margins: your browser does the layout and each page is saved in the PDF.
- For safety, the code is first cleaned and then shown in an isolated frame, without JavaScript, whose content policy forbids any connection: scripts, frames, objects and event handlers are removed, and links lead nowhere. The result tells you what was set aside.
- Honest limits: images, stylesheets and fonts hosted on the internet are not loaded (only those embedded in the code as “data:” show), and fonts installed on your device replace the others. CSS page breaks are ignored and a long block may be cut mid-line. 60 pages at most.
- The PDF is made of page images: its text is not selectable. For a PDF with selectable text, use the “Print or save with the browser” button, then “Save as PDF”. Depending on the browser, turning the page into an image may be refused: printing remains possible.
Frequently asked questions
Is my page's JavaScript run?
No, never. The code is cleaned and shown in an isolated frame without scripts, with a content policy that forbids any network access. A page that relies on JavaScript to display will therefore look incomplete.
Why are my images or font missing?
Because the tool loads nothing from the internet: no remote image, no linked stylesheet, no web font. Embed them in the code as “data:” (base64), or download them and add them another way.
Is my code sent to a server?
No. Cleaning, layout and PDF creation all run in your browser; the code and the PDF never leave your device.
Written and verified by the MaxyTools team · Updated on
Did this tool help you?
Did this tool help? Share it