ToollyX

HTML to PDF Converter

Convert HTML code or any public webpage URL to PDF — free, no watermark, no signup, no upload to any server. Paste code, upload a .html file, or enter a URL. Choose between a silent instant download or browser print for selectable text. Set page size, orientation, and margins before you convert.

INPUTHTML / URL
OUTPUTPDF
WATERMARKNone
PRIVACYNo upload
Page Size
Orientation
Margins
Background Colors
Included
Filename
.pdf

⬇ Download PDF — instant silent download. Text is not selectable (saved as an image snapshot).
🖨️ Print to PDF — for selectable, searchable text: in the print dialog set Destination → Save as PDF (not "Microsoft Print to PDF"). The window closes automatically after you save or cancel.

How to Convert HTML to PDF

1
Enter your HTML or URL

Select the HTML Code tab to paste, type, or upload a .html file. Click Example to load a sample invoice template. Or switch to Website URL to convert a live webpage — paste the full URL and click Open & Print.

2
Set PDF options

Choose page size (A4, Letter, Legal), orientation (Portrait or Landscape), and margin preset. Optionally toggle background colours on or off. These settings apply to both output methods automatically.

3
Download PDF or Print to PDF

Click Download PDF for an instant silent download with no dialog (image-based, text not selectable). Or click Print to PDF — the browser print dialog opens; set Destination → Save as PDF and click Save for a PDF with real, selectable text. The print window closes automatically after you are done.

Features

Silent Download — No Dialog

Download PDF instantly with no print dialog and no watermark. The PDF is image-based — great for visual documents, flyers, and reports.

🖨️Print for Selectable Text

Print to PDF via the browser dialog for a PDF with real, selectable, searchable text — ideal for invoices, CVs, and contracts.

📄Paste or Upload HTML

Type HTML directly, paste from any source, or upload a .html / .htm file from your computer using the Upload button.

🌐Webpage URL Mode

Enter any public URL to open it in a full browser window, then save it as PDF with Ctrl+P — full layout, CSS, and images included.

📐Page Size, Orientation & Margins

Choose A4, Letter, or Legal. Set Portrait or Landscape and pick a margin preset. Applied automatically via @page CSS — no dialog tweaking.

🔒No Upload, No Watermark

HTML code and URLs are processed entirely in your browser. Nothing is sent to any server. No watermark is ever added to your PDF.

What Is HTML to PDF Conversion?

Converting HTML to PDF means taking a web document — built with HTML tags and CSS styling — and producing a portable PDF file that can be shared, printed, or archived. HTML defines structure using elements like <h1>, <p>, <table>, and <div>. CSS adds visual design — colours, fonts, margins, and grid layouts. Together they form a complete document creation system that many professionals already use daily without needing traditional desktop publishing software like Word or InDesign.

Many workflows already produce HTML: email templates, web-based invoicing tools, automated reporting dashboards, and client-facing portals all output HTML that sometimes needs to become a PDF. A free, browser-based HTML to PDF converter — with no watermark and no upload — keeps this conversion fast, private, and infrastructure-free. Developers, designers, marketers, and small business owners use HTML-to-PDF daily to produce everything from invoices and proposals to product catalogs and legal agreements.

If your source content is Markdown rather than HTML, our Markdown to PDF tool converts Markdown syntax to a styled, downloadable PDF in one step. For Word documents, use our Word to PDF converter instead.

Two Ways to Convert: Download PDF vs Print to PDF

This tool offers two distinct conversion paths, each with different strengths. Understanding which to use makes a practical difference to your output quality.

Download PDF works by rendering your HTML inside a hidden off-screen iframe, capturing it as a pixel-accurate image using html2canvas, and packaging that image into a PDF file using jsPDF. The download happens silently — no browser dialog opens, and the file saves immediately. The trade-off is that the text in the resulting PDF is baked into the image, which means it cannot be selected, copied, or searched. This method is well-suited for visual documents: flyers, design mockups, HTML email previews, and any document where layout accuracy matters more than text extractability. Importantly, no watermark is added — the PDF is clean and ready to share.

Print to PDF takes a different approach: it opens your HTML in a new browser window, injects the correct @page CSS for your chosen size and orientation, and triggers the browser's native print function. In the print dialog, selecting Save as PDF (Edge/Chrome's built-in destination, not the "Microsoft Print to PDF" Windows driver) routes the output through the browser's own PDF rendering engine. This produces a proper text-based PDF where all text remains selectable, searchable, and accessible to screen readers. The print window closes automatically after you save or cancel. This method is the right choice for invoices, CVs, contracts, reports, and any document that will be read, searched, or copied from.

Neither method sends any data to a server. Both work without a signup. The choice comes down to one question: does the reader need to select or copy text from the PDF?

Converting a Webpage URL to PDF — How It Works

The Website URL mode converts any publicly accessible webpage to PDF using your browser's print function. Paste the URL, click “Open & Print”, and the page loads in a new browser window at full 1200px width. Press Ctrl+P (Windows/Linux) or Cmd+P (Mac), set the destination to Save as PDF, and save. The PDF captures the full rendered page — images, fonts, CSS, and dynamic layout — exactly as your browser displays it. You can also adjust the page size and margins in the print dialog before saving.

This approach is often more reliable than server-side URL-to-PDF services. Server-side converters use headless browsers on remote machines that may run older rendering engines, miss locally-loaded fonts, fail on JavaScript-rendered content, or produce subtle layout differences. Your own browser always uses its latest rendering engine, so modern CSS (flexbox, grid, custom properties), JavaScript-driven content, and web fonts all render correctly. Pages that require a login also work — you can be already signed in when you open the URL.

A manual Ctrl+P step is required because browser security prevents one website from silently printing another website's content. This is a deliberate browser restriction that protects your privacy — it prevents any site from capturing and saving third-party content without your knowledge. The one-click automatic URL-to-PDF you see in some tools requires a server running a headless browser, which means those tools receive your URL, any cookies you pass, and potentially the content of the page being converted.

Writing HTML That Converts Cleanly to PDF

Not all HTML/CSS designed for screens translates directly to print. A few practices produce cleaner PDFs. Use @media print { ... } CSS rules to hide navigation bars, sidebars, buttons, cookie banners, and interactive elements that have no meaning in a static PDF. Use break-before: page (or the older page-break-before: always) to force content onto new pages at logical boundaries — for example, before each major section in a long report or before each invoice in a batch document.

For background colours, the browser print dialog disables background graphics by default to save printer ink. If your design relies on coloured headers, alternating table rows, or shaded callout boxes, enable “Background graphics” in the print dialog's More Settings panel — or use the Background Colors toggle in this tool when using Download PDF. Where possible, use borders instead of background colours, since borders print regardless of the background graphics setting.

Use physical units (pt, mm, cm) rather than pixels in print CSS. For example, font-size: 11pt and margin-bottom: 8mm scale predictably across different page sizes and print DPI settings. Pixels are screen-relative and can produce inconsistent results in print contexts. Tables with width: 100%; border-collapse: collapse; and defined column widths produce the most reliable table rendering in PDF output. If the table data already lives in a spreadsheet, converting it directly with Excel to PDF often produces a cleaner result than rebuilding it as HTML first.

The @page CSS Rule — Controlling Page Size and Layout

The PDF Options panel on this tool automatically injects a @page CSS rule into your HTML based on your selections. But understanding the rule lets you add finer print control directly in your HTML code. @page { size: A4 portrait; margin: 1.5cm; } sets A4 portrait with 1.5cm margins on all sides. @page { size: letter landscape; margin: 0.5in; } produces a US Letter landscape PDF with half-inch margins. Any @page rules you include in your own HTML take precedence over the injected rules if they are more specific.

You can also target specific pages with pseudo-selectors. @page :first { margin-top: 4cm; } adds extra top margin to the first page only — useful for title pages and cover sheets. @page :left { margin-left: 3cm; } and @page :right { margin-right: 3cm; } create mirror-image margins for booklet-style documents. @page :blank { display: none; } suppresses intentionally blank pages inserted by break-before: recto. Chrome, Edge, and Firefox support all of these rules in their print rendering engines.

Who Uses an HTML to PDF Converter?

Web developers and freelancers build invoice templates, order confirmations, onboarding documents, and client reports as HTML/CSS — then need PDF versions for email attachments or client portals. Rather than integrating a server-side PDF library with its licensing costs and infrastructure overhead, they use a browser-based HTML to PDF converter for quick exports during development and for ad hoc client deliverables. The no-watermark, no-signup approach means the output is ready to send immediately.

Small businesses and sole traders design proposal templates in HTML for typographic precision — controlling exact fonts, spacing, logo placement, and colour — then convert to PDF to send branded quotes to clients. HTML gives them control that Word cannot easily replicate, and a free, no-watermark converter removes any need to pay for a premium PDF tool subscription just for an occasional document export.

Marketers and content teams produce capability documents, one-pagers, and campaign reports in HTML for pixel-level layout control, then convert to PDF for distribution via email or download links. Technical writers write documentation in HTML and need clean PDF exports for offline reading, printed manuals, or archived releases. Students and academics format CVs, academic papers, and portfolios in HTML for precise typographic control, then export to PDF for submission. Anyone who receives content as a webpage URL and needs a permanent, offline copy uses the URL-to-PDF mode.

Limitations — When to Use a Different Tool

The Download PDF method (html2canvas) requires that all visual content be already rendered in the DOM when the screenshot is taken. Heavily JavaScript-driven single-page apps that load content asynchronously after the initial render may appear incomplete in the screenshot. The Print to PDF method handles this better because the full browser window renders with JavaScript running normally — but very large or infinite-scroll pages may not paginate cleanly in the print dialog.

Neither method can be automated or scripted. If you need to generate hundreds of personalised PDFs from a database — payslips, invoices, certificates — a server-side solution using Puppeteer, Playwright, WeasyPrint, or wkhtmltopdf is the right tool. These run as background processes and can generate thousands of PDFs without any user interaction. This browser-based tool is designed for individual, on-demand conversions.

For URL conversion, pages behind authentication, VPN, or local network access cannot be opened in a new browser tab from a public site. For those pages, navigate to them directly in your browser and use Ctrl+P to print them to PDF from the authenticated session. If you need to convert HTML to formats other than PDF — such as DOCX, XLSX, or image files — that requires dedicated conversion tools for those formats. Our PDF to Text and Compress PDF tools cover common post-conversion workflows.

Frequently Asked Questions

Related Tools