HTML to PDF: Save Web Pages or Your Own Code as PDF

Capture a web page as a PDF, or convert HTML you wrote into a tidy, print-ready document. Type a URL, paste markup or upload an .html file, and have your PDF within seconds.

  • URL, markup or file
  • Rendered by a real browser
  • Erased after converting

Public pages only. Content from other domains (some images, fonts or ads) may not appear, and pages that need a login can’t be converted.

    🔒 Unlike our other tools, this converter runs on our server: your file is sent over an encrypted connection, converted automatically and deleted immediately. Nobody looks at it.

    How to use the HTML to PDF tool

    1. Pick a sourceSelect “Web page URL” for a live page, “Paste HTML” for your own markup, or upload an .html file.
    2. Provide itType the address (e.g. https://example.com/article), paste your HTML, or select the file.
    3. ConvertPress “Convert to PDF”. A genuine browser engine renders the page and prints it onto A4/Letter pages.
    4. SaveYour PDF downloads on its own.

    Conversion features

    • Genuine browser engineRendering uses the same engine as Google Chrome, so modern CSS layouts display correctly.
    • Keep articles and receiptsHold on to a copy of an online article, an order confirmation or a help page.
    • Templates into PDFsDevelopers and small firms can produce PDFs from HTML invoices, certificates and reports.
    • Print-aware@media print stylesheets and page-break rules in your CSS are followed.
    • Built with safety in mindScripts are switched off for pasted HTML, and all files are removed straight after conversion.

    The three input modes

    ModeGood forKeep in mind
    Web page URLPublic articles, blog posts, docs pages and receiptsOnly public pages can be reached. Material pulled from other domains, such as some images, embeds or ads, might not appear.
    Paste HTMLInvoices, certificates, emails and reports you build yourselfPut CSS inline and embed pictures as data: URIs. Scripts don’t run.
    Upload .html fileSaved pages and exported templatesThe same rules apply as for pasted HTML.

    Advice for anyone writing the HTML

    • Decide where pages break with break-before: page, or keep blocks together with break-inside: avoid on sections and table rows.
    • Define paper size and margins using @page { size: A4; margin: 15mm; }.
    • Hide menus, buttons and anything else meant only for screens inside @media print.
    • Pasted HTML can’t fetch external files, so embed logos as data URIs (<img src="data:image/png;base64,…">). You can make them with our Image to Base64 tool.
    • Stick to web-safe or system fonts; @font-face fonts embedded as data URIs also work.

    When a page won’t convert

    Anything that sits behind a sign-in, like webmail, online banking or social media feeds, is out of the converter’s reach. Some websites also turn away automated visitors, or assemble their content with so much JavaScript that it doesn’t finish in time. In those cases, open the page in your own browser and choose Print → Save as PDF.

    What happens to your data

    Pages are rendered on our server inside an isolated browser that can’t reach anything else, and the PDF is deleted the moment it’s been delivered to you. Pasted markup and uploaded files are removed at the same time.

    To slim down the result, run it through Compress PDF; to sign it, use Sign PDF.

    Frequently asked questions

    How can I save a web page as a PDF?
    Pick “Web page URL”, type the address and press “Convert to PDF”.
    Why don’t some images appear?
    For security, only content from the page’s own domain is fetched, and pasted HTML can display embedded (data:) images only.
    Is JavaScript executed?
    For web pages, yes, for a few seconds so the page can finish loading. For pasted HTML, scripts are turned off for safety.
    Can pages behind a login be converted?
    No. Open them in your browser and use Print → Save as PDF instead.
    Can I set page breaks and margins?
    Yes. CSS like @page { margin: 15mm } and break-before: page is honoured.