Formatomat

Convert HTML to PDF

Turn your HTML pages into PDF documents in seconds. Conversion happens in your browser, so your files are never uploaded to a server.

  • Files never uploaded
  • Free, no sign-up
  • No queue

or drop them here. You can also paste an image (Ctrl+V).

Free · No sign-up · No upload

How to convert HTML to PDF

  1. 01

    Add your HTML files

    Click “Choose HTML files” or drop them on the page. You can add several at once.

  2. 02

    Check the PDF format

    PDF is already selected. By default, the pages keep the document’s size and orientation (A5, Letter, A3 landscape…); choose A4 or Letter to apply that size to every page.

  3. 03

    Convert and download

    Click “Convert”, then download your PDF file. With several files, grab everything at once as a ZIP.

HTML to PDF: what to know

The PDF is built from the structure of the HTML, not from its appearance: headings, paragraphs, lists, tables, quotes and preformatted blocks are laid out cleanly, the page title (the title tag) becomes the document title, and a table’s header rows, made of header cells (th), repeat at the top of every page. A table too wide for the page is printed smaller and, if it still doesn’t fit, split into successive tables that repeat the first column; a message then says so. A picture more than twice as tall as the page (a long infographic, a phone screenshot) keeps its width and continues over the next pages; a less tall one is made smaller to fit one page. This works well for an email saved as .html, an export of documentation or notes, or a report generated by software.

Because the site’s arrangement is not reproduced, a web page saved from the browser also brings its menus, sidebars and footers along as text. Its blocks are written in the order the page shows them on screen (flex boxes, grids) and set apart as it sets them apart, and a table made with styles stays a table; a block the page places at the top of its box, after the start of its first line (a price at the top right of a product card), is written after that line; another block the page places elsewhere by its position (absolute or fixed position) stays where it is in the file, and a message names it. What the page itself hides, with the hidden attribute, with styles written in the file, in a closed dialog or popover or with a fixed-size box that cuts off what overflows it, stays hidden as in a desktop browser, on screen (rules meant for printing hide and show nothing; a message quotes what the printed page shows differently), and a message quotes the text cut off; a line a box cuts in part is kept whole, and a message quotes what the page hides of it; the content of a collapsed section is kept unfolded, and text the page makes invisible without removing it (transparent, zero-sized, the colour of the background, off the screen, in a shape, under a mask or under a filter) is kept: a message quotes both. The bold, italics or strikethrough those styles give are kept, as are the list signs and numbers they set (A., i., ✔, a number forced on an item), the letter case they impose (upper or lower case), applied in the text’s language, and the line breaks and spaces they keep (the white-space property: a Notion export, code pasted from an editor). Small capitals and mirrored, upside-down, vertical or turned text are written as ordinary letters on horizontal lines, and text shown in a forced order (the bdo element) is kept with Unicode control characters that keep that order; a message points out these texts and quotes examples of them. A picture the page turns or flips, itself or through the box it sits in, keeps its angle, and a picture its box crops or surrounds with space (object-fit) is drawn as the page shows it. What a separate stylesheet was hiding, such as a cookie banner, may show up again: a message names those stylesheets, which the converter cannot read; and if the page’s layout cannot be worked out, a message warns that text the page cuts off or hides may be in the file. Lists in a page exported from Google Docs or Word keep their levels and numbering, and symbols in the Symbol and Wingdings fonts of a page saved by Word become the characters they display (α, Ω, ✓). Content added by JavaScript, common on modern sites, is missing from the file. A page made only of frames (such as the index of old Javadoc documentation) is refused, with the names of the files it shows: convert those instead. Images saved in a separate folder or on the web are not included: their description, when they have one, is written in their place, as in a browser that cannot display them, and a message points them out. Page breaks asked for printing (page-break styles, sections of a Word web page) are kept, as are the page size and orientation (@page): if you force A4 or Letter in the settings, only the orientation is kept, and without an @page rule, the pages are A4. An .xhtml file is read the way the browser opens it.

HTML vs PDF: what’s the difference?

HTMLHyperText Markup Language

The language of web pages. An HTML file opens in any browser and holds structured text, links and images.

PDFPortable Document Format

A document format created by Adobe in 1993 and now an ISO standard. The layout looks the same on every device, which makes it the reference format for sharing, signing and printing.

HTML to PDF: frequently asked questions

How do I convert a web page to PDF and keep its layout?

This conversion doesn’t keep it: it produces a clean, readable version of the content, without the site’s colours, fonts or arrangement. For a PDF that keeps the site’s layout, open the page in your browser, start printing and set the destination to Save as PDF.

Do the links in my HTML page stay clickable in the PDF?

Yes, for links to a web page or an email address: they appear blue and underlined, and stay clickable. Their address is not printed, so if it matters to readers on paper, write it out in the text before converting. A link to another part of the same page (a # anchor) stays clickable and leads to that place in the PDF. In a page that states its web address (a base tag), relative links also lead to the right page of the site; in a page saved from a browser, all its relative links (“/contact”, “../prices/”, “?page=2”) lead to the page they pointed to on that site, and a link written without its protocol (“//cdn.example.com/…”) becomes an https address.

Are my HTML files uploaded to the internet?

No. The file is read and converted by your browser, on your device. Nothing is sent to a server, and nothing is kept after you close the page.

Does converting HTML to PDF reduce quality?

Text, structure (headings, lists, tables) and images embedded in the file are kept, in standard fonts, as are bold, italics, strikethrough, list signs and line breaks given by styles. The page’s arrangement, scripts and images hosted elsewhere are not (the description of those images, when they have one, is written in their place), and what the page hides, including text cut off by a fixed-size box, is left out, and a message says so; text that is invisible but present (transparent, a collapsed section, off the screen, in a shape, under a mask or a filter, a line cut in part) is kept and pointed out. A check then compares the words and pictures carried over with those of the document, not their layout; for a long document it compares only the beginning, and the file’s row says so. If it finds a passage or a picture missing, a message says so.

How many HTML files can I convert?

As many as you like, for free and without signing up. Add them all, then download the results one by one or in a single ZIP. The maximum size depends on your device and browser, with a few caps that protect its memory (for example 20,000 files per archive or 5 million filled cells per workbook: see the home page FAQ); a file over one of them is not converted, and a message says so.

Does it work on iPhone and Android?

Formatomat is designed for recent browsers on computers, iPhone and Android, with no app to install. A conversion the browser cannot do (a format it cannot read or write) is refused with a message that says so.