HTML to PDF

Paste HTML code or open a saved .html page, check the cleaned-up live preview and download a tidy PDF. The text stays selectable and searchable, and headings become bookmarks.

Working…

Your HTML stays on your device. The draft is saved only in this browser.

How to HTML to PDF

  1. Paste your HTML code, or open a saved .html / .htm file.
  2. Check the preview and choose paper size, margins, font and text size.
  3. Click "Download PDF".

Frequently asked questions

Can I convert a web page by entering its address?

No. Browsers do not let one site read pages from another site (this rule is called CORS), and this tool never connects to other websites. Instead, open the page, press Ctrl+S (Cmd+S on a Mac) or choose "Save page as", save it as "Web page, HTML only" and open the .html file here.

Which HTML elements are kept?

Headings, paragraphs, bold, italic, strikethrough, links, bullet and numbered lists, tables, code blocks, quotes, horizontal rules and images embedded as data URLs. CSS styles, colours, page layouts, scripts and forms are not used: the content is laid out again as a clean document.

Is it safe to paste HTML from an unknown source?

Yes. Before anything is shown, the code is cleaned with DOMPurify: scripts, event handlers such as onerror and javascript: links are removed. Nothing in the HTML is run and nothing is loaded from the internet.

Why are my images missing?

Only images embedded in the code as data URLs (data:image/png;base64,…) can be included. Images with a relative path or a web address cannot be loaded, because the tool never fetches files from the internet. Their alt text is written instead.

Can I select the text in the PDF? Which languages work?

Yes, the text is real text with embedded fonts and headings appear as bookmarks. The fonts cover Latin-script languages, including Turkish, German, French and Spanish. Letters from other scripts (Cyrillic, Greek, Arabic, Chinese and so on) and emoji appear as "?".

Do you have tools for other formats?

Yes. For Markdown use Markdown to PDF, for e-books use EPUB to PDF. To combine the result with other PDFs, use Merge PDF.

Is my HTML uploaded?

No. Cleaning, preview and the PDF are all done in your browser. Your draft is only stored on this device.

Other tools

Search tools