Skip to content
DoItJag

HTML to PDF

Make a PDF from HTML, such as an email template, an exported report, an invoice or notes saved as a web page. Paste the code or open the file, choose the paper size, and the converter lays out the content with its headings, paragraphs, lists, tables, links, colours and pictures embedded in the file. Styles in the page’s own style block are applied. Nothing is downloaded from the internet, so remote pictures and fonts are left out.

or drop a file here · .html, .htm · up to 20 MB

Pictures must be inside the file (data: URIs). Nothing is fetched from the internet, so links to pictures, style sheets and fonts on other websites are not used. To save a live web page exactly as it looks, open it and use your browser’s Print, then Save as PDF.

About HTML to PDF

HTML is the language web pages are written in, but it also turns up outside the browser: email newsletters, invoices exported by billing software, notes saved from an app, or a report a developer generated. When someone needs that content as a document to print, sign or attach, a PDF is the usual answer. Paste the code here, or open the .html file, and you get a tidy PDF with selectable text.

What the converter understands

It reads the content the way a printer would: block by block from top to bottom.

  • Headings, paragraphs, quotes and horizontal rules.
  • Bold, italic, underlined and struck-through text, font sizes and colours.
  • Bulleted and numbered lists, nested to several levels, with their numbering styles.
  • Tables with column and row spans, heading rows repeated on new pages, borders and cell colours.
  • Pre-formatted code with its spacing kept.
  • Clickable links.
  • Pictures stored inside the file as data: addresses.

Styling written in a style block at the top of the file, or in style attributes, is applied for the common properties: colour, background, size, weight, alignment, margins, indents and hidden elements.

What it does not do

Rendering a site’s look pixel for pixel needs a full browser engine. Pages arranged side by side with flexbox, grid, floats or fixed positions come out stacked, and custom web fonts become standard fonts. The tool never contacts other websites, so linked style sheets, fonts and pictures hosted elsewhere are skipped; a picture’s description text is shown in its place. You cannot enter a web address for the same reason.

If you need a copy of a live web page exactly as it appears, open it in Chrome, Edge, Firefox or Safari, press Ctrl+P or Command+P and choose Save as PDF.

Safety

Scripts in the HTML are never run, and forms and frames are not loaded, so even a file from an unknown sender cannot do anything while it is being converted. Everything happens on your device.

How to use HTML to PDF

  1. Paste your HTML into the box or open an .html file (or try the sample invoice).
  2. Choose the paper size, orientation and margins, then select Convert to PDF.
  3. Check the preview and select Download PDF.

Privacy: how it works

Your HTML is processed on your own device by your browser. It is not uploaded, scripts in it never run, and nothing is downloaded from the internet.

Frequently asked questions

Can I convert a web page by its address?

No. Fetching other websites from this page is blocked by browsers and would expose what you convert. To save a live page exactly as it looks, open it and use your browser’s Print, then Save as PDF. Use this tool for HTML code and files you already have.

Why does my page layout look different?

The converter turns HTML into a printed document, one block after another. Text styles, colours, tables, lists and alignment are kept, but side-by-side layouts built with flexbox, grid, floats or fixed positions are stacked, and web fonts are replaced by standard fonts.

Do scripts in the HTML run?

No. The HTML is read as inert text: scripts, forms and embedded frames never run or load, so converting an unknown file is safe for your device and your privacy.