Skip to content
DoYourPDF

HTML to PDF

Paste HTML or choose an .html file.

Or open a file instead.

Runs on this device. Nothing is uploaded.

How to use HTML to PDF

  1. 1Paste HTML, or choose an .html file.
  2. 2Pick the page size and font.
  3. 3Press “Convert to PDF” and save the result.

About this tool

Typesets headings, paragraphs, lists, tables, code, quotes, images (embedded ones) and links into a clean PDF with bookmarks.

Your files stay on this device. DoYourPDF opens and processes them inside your browser. The counter in the top bar shows how many bytes of your files this page has sent to any server: it should read 0 B. How this works

Related tools

Questions about HTML to PDF

Can I convert a web page from its address?

No. It turns HTML you paste, or an .html file you choose, into a PDF, and it never fetches anything from the internet. To keep a page exactly as your browser shows it, use the browser's own Print and choose to save as PDF.

Is my page's CSS used?

Partly. Style sheets and <style> blocks are left out, and scripts don't run. Styles written on an element itself are kept where they set bold, italic, underline, colour (as a #code or rgb()), background colour, font size, alignment or a sans, serif or mono font. Columns, grids and positioned boxes come out one after another.

Why are some of my images missing?

Only images embedded in the HTML itself, as a data: address in the src, can be included. Images linked from a website, or from a file next to your HTML, are left out, because nothing is fetched. To make a PDF of photos, use Images to PDF.

Are links clickable in the PDF?

Yes, for web, email and phone links: addresses that start with http, https, mailto or tel. A link written as a path on your own site, such as /about, or as a jump to another part of the page becomes plain text.

Does it add bookmarks and page numbers?

Yes. When the HTML has two or more headings (h1 to h6), they become bookmarks, up to three levels deep. A PDF longer than one page gets page numbers such as “2 / 5” at the foot of each page.

How do I start a new page at a certain point?

Add style="break-before: page" (or the older style="page-break-before: always") to the element that should begin the new page, such as a heading.

Can it print Hindi, Tamil or other Indian languages?

Yes. Hindi, Bengali, Punjabi (Gurmukhi), Gujarati, Odia, Tamil, Telugu, Kannada and Malayalam print as real text with their letters joined correctly, and so does the ₹ sign. Urdu isn't supported yet.

Is DoYourPDF really free?

Yes. Every tool costs nothing: no account, no page caps, and nothing stamped on your files.

Are my files uploaded?

No. Files are opened and processed by your own browser. They never reach a server. Apart from an anonymous visit count, the only things that use the network are optional: AI answers (if this site enables them) send the question plus relevant passages of text, never the file; P2P Share and the whiteboard connect two browsers over an encrypted connection.