TinyFileLab

Home›Convert›HTML to PDF

Nothing is uploaded — it all runs on your device

HTML to PDF converter

Paste HTML or open an .html file and get a tidy, searchable PDF with real headings, lists, tables and links. Email templates and CMS exports welcome; nothing is uploaded.

Paste or open some HTML. The PDF is built in this page and shown before you download it.

Paste the HTML, not a linkEmail templates, CMS exports and saved pages are converted without fetching anything.
Real text, real linksSelectable, searchable text with clickable links, set on proper pages.
No browser clutterNo URL, date or page title stamped in the margins, and nothing uploaded.

Two ways to turn HTML into a PDF

There are really two different jobs that go by this name, and they need different tools.

If the page is open in your browser and you want it exactly as it looks, colours, columns, web fonts and all, the best converter is already on your computer: the browser’s own print dialog. It is the same rendering engine that drew the page, so nothing is approximated:

  • Chrome and Edge: press Ctrl+P (⌘+P on a Mac), set Destination to Save as PDF, open More settings to switch off Headers and footers (that removes the URL and date in the margins) and switch on Background graphics if the colours matter, then Save.
  • Safari: File › Export as PDF gives one long continuous page; File › Print › PDF › Save as PDF gives paged output.
  • Firefox: Ctrl+P, choose Save to PDF, and untick Print headers and footers under More settings.
  • On a phone: open the share sheet, choose Print, then pinch outwards on the preview (iPhone) or pick Save as PDF as the printer (Android).

Sites with a print stylesheet come out well this way. Many do not have one, and you get cookie banners, sidebars and menus spread over several pages.

If you have HTML rather than a page — an email template, an export from a CMS or help desk, a snippet from an API, a saved .html file, something generated by a script — and you want a tidy document rather than a screenshot, that is what this tool is for. Paste the HTML or open the file and it is read for its structure: headings, paragraphs, lists, tables, quotes, code blocks, links and embedded pictures. That structure is set on proper pages with consistent typography, a title, and page numbers. The output is real text, so it can be searched, selected and read by a screen reader, and a ten-page document is usually a few dozen kilobytes.

What it does with messy HTML

Real-world HTML is rarely tidy. Email in particular is built from tables nested three deep purely for layout, with text sitting loose inside <div>s and lines broken with <br>. This converter reads it the way a person would:

  • Layout tables are unwrapped. A table that contains another table, has headings or paragraphs inside its cells, is marked role="presentation", or has only one column is treated as layout, and its cells are read in order as ordinary text. A table with real rows and columns of data stays a table.
  • Line breaks are kept. A single <br> starts a new line inside the same paragraph, so addresses and signatures keep their shape; two in a row start a new paragraph.
  • Invisible things are dropped. Scripts, style sheets, form controls, embedded frames, and anything hidden with hidden, aria-hidden or an inline display:none never appear.
  • Site furniture is left out. With the option on, if the page marks its main content with <main> (or has a single <article>), only that is converted; otherwise top-level navigation, headers, footers and sidebars are removed. Untick it to keep everything.
  • Links stay clickable when they are full web or email addresses. Relative links such as /about lead nowhere inside a PDF, so they become plain text, unless the HTML has a <base href> that makes them absolute.

Pictures and privacy

Pictures embedded in the HTML itself as data: URIs, which is how many email builders and exporters include them, are decoded and placed in the PDF. Pictures that point to a web address are not downloaded: fetching them would tell that server you opened this document (it is exactly how email tracking pixels work), and most servers refuse cross-site requests from a page like this anyway. Their alt text is printed in their place so you can see where they were. The HTML itself never leaves your browser.

What this is not

CSS is not applied: colours, fonts, columns and positioning from the page’s style sheet are replaced by a clean single-column layout. That is deliberate, because reproducing a browser’s layout requires a browser, and the print dialog described above already is one. The built-in PDF fonts cover Latin-script languages (English, the Western and Central European languages, accents, curly quotes, dashes and the euro sign); text in Chinese, Japanese, Arabic, Cyrillic or Greek would print as question marks, and the page warns you before that happens. For those, use the browser’s print dialog. Forms are not interactive in the PDF, and video, audio and embedded maps are left out.

Common questions

Is my HTML uploaded?

No. It is parsed and laid out by this page in your browser, and the PDF is built there too. Nothing is sent anywhere, and pictures that point to other servers are not fetched.

Why does the PDF not look like the web page?

Style sheets are not applied: the HTML is read for its structure and set as a clean document. If you need the page exactly as it appears, use your browser's Print dialog and choose Save as PDF; the steps for each browser are above.

Can I convert a web page by its URL?

Not here. Fetching another site from this page is blocked by browsers and would mean sending your request through a server. Open the page, press Ctrl+P and save as PDF, or save the page as .html and open that file here.

How do I remove the URL and date from the margins of a printed PDF?

In Chrome and Edge, open More settings in the print dialog and untick Headers and footers. In Firefox, untick Print headers and footers. PDFs made by this tool never have them.

What happens to images?

Images embedded in the HTML as data: URIs are included. Images that link to a web address are not downloaded, because fetching them would tell the sender you opened the document; their alt text is shown instead.

Will it work on an HTML email?

Yes, that is one of the main uses. Layout tables are unwrapped into ordinary paragraphs, line breaks are kept, hidden preheader text is dropped, and links stay clickable.

Are links clickable in the PDF?

Full web and email links are. Relative links like /pricing are turned into plain text unless the HTML includes a base address, because inside a PDF they have nowhere to go.

Does it support Chinese, Arabic or Russian text?

No. The PDF uses the built-in Latin fonts, so other scripts would print as question marks, and the tool warns you before that happens. The browser's Save as PDF handles every script.