Skip to content

Convert HTML to PDF

Turn HTML into a PDF with selectable text. Paste code or open an .html file, check the safe preview, and save it as a PDF using your browser’s built-in PDF engine.

Preview

Orientation
This opens your browser’s print dialog with the document ready to go. Choose Save as PDF (or “Microsoft Print to PDF” on Windows) as the printer, then save. Your browser’s own PDF engine creates the file, so text stays selectable and every language is supported.

How to convert HTML to PDF

  1. Add your HTML

    Paste markup into the editor or open an .html file.

  2. Check the preview

    The document is shown in a locked-down preview with scripts disabled.

  3. Choose page settings

    Pick paper size, orientation and margins.

  4. Save as PDF

    Press Save as PDF and choose “Save as PDF” in the print dialog.

Key features

Real text, every language

Your browser lays out the page with its own fonts, so text is selectable and any script displays correctly.

Safe preview

Scripts, forms and embedded frames are stripped, and the preview runs in a sandbox with no network access to other sites.

CSS support

Inline styles and <style> blocks work, including print rules such as page-break-before.

Page controls

Set the paper size, orientation and margins without editing CSS.

How it works and its limits

Browsers already contain an excellent HTML-to-PDF converter: the print engine. This tool prepares your HTML safely and hands it to that engine. The PDF is generated by your browser, on your device; we never see it.

We can’t fetch live web pages by address, because browsers block one website from reading another’s content. To save a web page you’re viewing, use your browser’s own Print › Save as PDF. Images and stylesheets hosted on other sites aren’t loaded in the preview, for privacy; embed images as data URLs if you need them.

On iPhone and iPad, the print dialog doesn’t offer “Save as PDF” directly: tap Share in the print preview, then Save to Files. If you just need plain text in a PDF, Text to PDF creates the file directly.

Security and privacy

HTML to PDF runs entirely in your browser. Your content is processed in this tab’s memory and never uploaded to PDF365 or anyone else. When you close the tab or press “Start over”, the data is discarded.

Read more in our privacy policy.

Questions about HTML to PDF

Can I convert a website by entering its URL?
Why don’t my images show?
Does JavaScript in my HTML run?
How do I remove the date and URL from the page edges?

Browse all PDF tools