Home/PDF Tools/HTML to PDF
🌐

HTML to PDF

FREE

Paste HTML and get a PDF with selectable text

Free · No sign-up required
Loading...

What HTML to PDF does

Paste HTML or upload an .html file and the tool produces a PDF with selectable text from the document's content: headings, paragraphs, lists, tables, code, block quotes, emphasis and embedded images. It reads the HTML's structure rather than rendering its CSS, so the output is a clean text document, not a screenshot of a styled web page. That makes it the right tool for saving an article, an email, a generated report or a template's content as a document — and the wrong one for capturing a page's visual design. Everything runs in your browser; the HTML is not sent to a server.

Structure conversion vs page rendering

This toolBrowser 'Print to PDF' / headless Chrome
ReadsThe HTML element treeThe fully rendered page with CSS
OutputText document in standard fontsPixel-faithful page
Layout, colours, fontsNot appliedApplied
Scripts, remote images, web fontsIgnoredLoaded
Text selectableYesYes
Best forContent: articles, emails, reports, docsDesign: invoices with branding, marketing pages

For a design-faithful PDF of a page you can open, use the browser's own Print → Save as PDF; it is free and exact.

Supported elements

  • h1h6, p, br, hr
  • ul, ol, li with nesting
  • strong/b, em/i, code, pre
  • blockquote (indented)
  • table — each row becomes a line of cells separated by bars
  • img with a data-URL source (PNG or JPEG)
  • a — link text is kept; the URL is not made clickable

script, style, nav, header, footer and hidden elements are skipped so that a saved web page yields its article, not its menus.

Common uses

  • Archiving an article or blog post as readable text without the site's chrome.
  • Converting an HTML email (saved from a mail client) into a PDF for records.
  • Turning an HTML report produced by a script or a test runner into a shareable document.
  • Producing a PDF from HTML on a device with no browser print dialogue (some kiosks and embedded views).
  • Converting documentation exported as HTML into a single portable file.

Tips for better output

  • Paste only the fragment you want (the article element) if the page has sidebars the skip rules do not catch.
  • Inline images as data URLs before converting; a quick way is the Image to Base64 tool on this site.
  • Wide tables are joined with bars and wrapped — for many columns, use the spreadsheet tools instead.
  • Characters outside Western Latin are not drawable with the standard fonts; use browser printing for those languages.

Frequently asked questions

Why does the PDF look nothing like the web page?

CSS is not rendered. The tool extracts the content and lays it out plainly. Use the browser's Print → Save as PDF for the visual design.

Can I convert a URL?

No — the tool has no network access to fetch pages. Save the page as HTML (or copy its source) and upload that.

Why are my images missing?

Only data-URL images are embedded. Images referenced by URL cannot be fetched by the converter.

Are links preserved?

As text only. Add the URL in brackets if readers need it.

Does it run JavaScript?

No. Scripts are ignored; content generated by JavaScript will not appear. Save the rendered DOM from the browser's inspector instead.

Is my HTML uploaded?

No. Parsing (DOMParser) and PDF layout (pdf-lib) run in your browser.

More tools in this category

🔗
Merge PDF
Combine several PDF files into one document
Split PDF
Break a PDF into single pages or two halves
📑
Extract PDF Pages
Pull selected pages or ranges into a new PDF
🗑
Delete PDF Pages
Remove specific pages or ranges from a PDF
🗜
Compress PDF
Shrink scanned or image-heavy PDFs by re-rendering pages
🔄
Rotate PDF
Rotate every page by 90°, 180° or 270° losslessly