Saved

Press the star next to a tool's name to save it.

All my tools

HTML to PDF Converter

Use this HTML to PDF converter to turn pasted HTML or an .html file into a PDF with headings, lists, quotes and links, made in your browser.

Paste your HTML or choose an .html file. Headings, paragraphs, lists, quotes, code blocks and links are kept as text. Scripts, styles, forms and images are left out, and the page's own colors, fonts and layout are not reproduced.

Your HTML is converted on this device and is never uploaded.

Your PDF

Paste HTML or choose a file, then press Convert to PDF.

Making the PDF…

An HTML to PDF converter turns a web page or a piece of HTML into a PDF file that you can save, print or send. This tool reads the HTML in your browser, keeps the headings, paragraphs, lists, quotes, code and links, and writes a clean text PDF on Letter pages. Nothing is uploaded. It is meant for documents, notes, emails and simple pages, and not for pages whose look depends on their style sheets.

How to use the HTML to PDF converter

  1. Paste your HTML in the box, or choose an .html file.
  2. If you want, type a title for the PDF. If you leave it blank, the tool uses the page's title tag.
  3. Press Convert to PDF.
  4. Press Download PDF.

What is kept and what is left out

The tool reads the HTML with a small parser that understands the common tags. It keeps headings, paragraphs, bold and italic text, links, bulleted and numbered lists, quotes, preformatted code blocks and horizontal rules. It leaves out scripts, styles, forms, buttons, embedded frames, canvases and pictures, since a plain text PDF has no place for them. The colors, fonts, columns, margins and any layout set by style sheets are not reproduced, because the converter does not run a browser engine. If you need an exact copy of how a page looks, use the print function of your browser and choose Save as PDF.

How the PDF is made

PDF is a format developed by Adobe in 1993 for presenting documents independently of software and hardware, and it is now standardized as ISO 32000. It holds a complete description of a fixed-layout document, with the text, fonts and graphics. This tool writes a new PDF with the standard Helvetica and Courier fonts that every PDF reader has, on Letter pages with one-inch margins, and it wraps the lines to fit. Headings are larger and bold, list items have bullets or numbers, and code is set in a monospaced font. Because the fonts are the standard ones, a few characters outside the Western European set cannot be shown, and the tool tells you how many were replaced.

Good uses

The converter works well for documents that you wrote as HTML or that came as an email or an article: meeting notes, a letter, a recipe, a README, a short report or the text of a web page that you copied. It is quick, it works without an internet connection after the page has loaded, and it keeps your text private. It is less suited to web pages with complex layouts, tables with many columns, or pages made mostly of pictures.

Tips for good results

  • Use real headings and lists in your HTML, since the converter turns them into a clear structure.
  • Remove menus, banners and sidebars before you paste a whole web page.
  • Put a title tag in the HTML or type a title, so that the file has a good name.
  • Check the PDF after downloading, especially the links and lists.

A short example

Press Insert an example to see how it works. The example has a title, a heading, a paragraph with bold text and a link, a second heading, a list and a quote. After you press Convert to PDF, the result is a one-page PDF with the same structure, named after the title of the page. You can then replace the example with your own HTML.

Limits

The tool accepts up to 2 MB of HTML. Very long pages produce many PDF pages. Right-to-left languages and scripts that need other fonts, such as Chinese, Japanese or Arabic, cannot be shown with the standard fonts and will be replaced by question marks. For those, use your browser's own print to PDF function.

Printing a page instead

If you want the PDF to look exactly like a page on the web, with its colors, images and layout, use the print command of your browser and choose Save as PDF as the destination. That uses the browser's own layout engine. This tool does something different: it gives you a clean document with the content of the page, which is often easier to read and to share, and it works on HTML that you only have as text, such as the source of an email or a template.

Working with templates

If you generate HTML from a template, for example for a letter or a report, you can paste the finished HTML here and get a PDF without any other software. Keep the markup simple, with headings and paragraphs, and the result will be tidy. Complex tables should be avoided, since cells are written as lines of text.

Privacy

The HTML that you paste or choose is processed in the page on your own device. It is not sent to a server, so it is safe to use for private notes or drafts. Close the page when you have finished if you share your computer, since the text stays in the box until you press Clear.

Common mistakes

  • Expecting the page to look the same. The result is a text document.
  • Pasting a page with scripts and menus. Clean it first.
  • Using other alphabets. The standard fonts cover Western European text.
  • Forgetting the title. A title gives the file a clear name.

What next

Use this often? Add HTML to PDF to your Home screen.

Frequently asked questions

What is an HTML to PDF converter?

A tool that turns HTML into a PDF file, here as a clean text document with the structure of the HTML.

What does the converter keep?

Headings, paragraphs, bold and italic text, links, lists, quotes, code blocks and rules. Scripts, styles, forms and images are left out.

Will the PDF look like the web page?

No. It is a text document in standard fonts. For an exact copy of a page's look, use your browser's Save as PDF.

Is my HTML uploaded?

No. The conversion runs in your browser.

Can it show Chinese, Japanese or Arabic text?

No. The standard PDF fonts cover Western European characters, and other characters are replaced with a question mark.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More PDF Tools