Skip to content
WorldofPDFs

Turn HTML into a real PDF document

Paste HTML or load an .html file and get a PDF with genuinely selectable text — headings, lists and tables laid out properly rather than photographed. It uses the same layout engine as the Markdown and Word converters here, so the output is searchable, copyable and small.

HTML to PDF

DOMParser · flow layout, selectable text

Ready

Loading tool…

How to convert HTML to PDF

  1. Add your HTML. Paste markup into the box, or use "Load an .html file" to read one from disk.
  2. Pick a page size. A4 or Letter. Margins are set for comfortable reading at either size.
  3. Convert. The markup is parsed into headings, paragraphs, lists and tables, then flowed onto pages with proper word wrap and page breaks.
  4. Download. The PDF saves straight to your device. Its text is real text — select it, search it, copy from it.

Why there is no URL box

Every hosted HTML-to-PDF service takes a web address and renders it with a headless browser on a server. That is a genuinely different product, and it is one this site cannot honestly offer: fetching a URL means sending it somewhere, and nothing here leaves your browser. A privacy claim that quietly stops applying to one tool is worth less than no claim at all.

There is a second reason. Rendering an arbitrary web page needs a full CSS engine — floats, grid, media queries, web fonts. This converts semantic HTML: the structure of your markup, not the visual result of a stylesheet. For a report, an invoice template or an exported article, that is exactly what you want.

What is supported

The parser reads the elements that carry meaning and maps them onto a printed page:

  • Headings h1 to h3, sized and spaced as a hierarchy
  • Paragraphs, with real word wrap and automatic page breaks
  • Bulleted and numbered lists, including nesting
  • Tables, with an optional header row
  • Bold and italic runs inside any of the above

Real text, not a screenshot

The common way to build this feature is to render the HTML in a hidden element and photograph it with html2canvas. It is quick to write and produces a PDF that cannot be searched, cannot be copied from, is unreadable to a screen reader, and is many times larger than it needs to be.

This draws each run as text with an embedded font instead. A ten-page document comes out as tens of kilobytes rather than several megabytes, and Ctrl+F works in it.

Frequently asked questions

Can I give it a website address?

No, by design. Fetching a URL would mean sending it to a server, and this site does not make outbound requests with your data. Save the page from your browser and load the .html file instead, or paste the markup.

Are my CSS styles applied?

No. External stylesheets are not fetched and inline CSS is not interpreted. Layout comes from the structure of the HTML — headings, lists, tables — rather than from styling. That keeps output consistent and readable.

Are images included?

No. Images referenced by a URL would require a network request, which this tool does not make. Text, lists and tables are converted.

Is the text selectable in the PDF?

Yes. Every run is drawn as real text with an embedded font, so you can select, search and copy it, and screen readers can read it.

Does JavaScript in the page run?

No. Scripts are ignored entirely — only the markup you supply is converted. Nothing in the HTML you paste is executed.

Is my HTML uploaded?

No. Parsing and PDF generation both happen in this tab. You can disconnect from the internet after the page loads and the tool still works.

What if my HTML is a full page with a head and body?

That is fine. The parser reads the body content and ignores the head, scripts and styles around it.

Related tools