About HTML to PDF Converter
Paste HTML or open a saved web page, and this tool rebuilds its content as a PDF document: headings, paragraphs, bold and italic text, lists, tables, quotes, preformatted code, images embedded as data, and links that still work. The HTML is cleaned first, so scripts never run.
This keeps the structure and the text, not the styling: the page’s CSS, colours, fonts, columns and positioning are not applied, and nothing the page refers to is fetched from the web. For an exact copy of how a page looks on screen, use your browser’s own print-to-PDF instead.
How it works
- The text is broken into lines at spaces and after hyphens, measured with the real widths of the font, and placed on pages inside the margins you choose.
- Text is set in Liberation Sans, embedded in the PDF with only the characters used, so it covers Latin, Greek and Cyrillic. Monospace text uses the standard Courier font when every character allows it.
- For other scripts, add your own TTF or OTF font: characters the built-in font lacks are drawn with it. Characters no font has stop the conversion with a list of them, rather than vanishing.
- The PDF is written in a background worker with pdf-lib, then page 1 is drawn as a preview. The font is fetched once from this site and kept for offline use.
Questions
Will the PDF look like the page in my browser?
No, and that is deliberate. Stylesheets, inline styles, layout and web fonts are not applied. The PDF has the page’s content in a consistent document layout, which suits archiving and reading, not pixel-perfect copies.
Which images are included?
Images embedded in the HTML as data: URLs, and images whose file you add under Images. Images that point at web addresses are left out with a note, because this tool never fetches anything.
Is it safe to paste HTML from an unknown source?
Yes. The HTML is sanitised before it is read: scripts, event handlers, forms and embedded frames are removed, and only http, https and mailto links are kept as links.
Can I convert a whole website or a URL?
No. This tool works on HTML you paste or open from your device; it does not visit addresses. Save the page from your browser first, then open the .html file here.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.