</> HTML → PDF

HTML to PDF Converter — Free Online

URL, pasted code or a saved .html file in — a paged PDF out.

Your HTML

Supports HTML fragments, full documents, inline CSS, and <style> tags. External images need CORS or a data: URL — otherwise they are omitted to avoid export errors.

Page settings

Advanced settings

Delay before capture for charts or dynamic content.

Convert webpage URLs, HTML code, or .html files into polished PDF documents — entirely in your browser. Developer-friendly settings, live preview, A4/Letter/Legal sizes, headers, footers, and zero server upload.

🔒 100% client-side — your HTML never leaves your device

URL · Paste · Upload CSS support Live preview No signup Free forever
⚡Fast local render
🎨CSS support
📐Page controls
👨‍💻Dev-friendly
📱Mobile ready
Developers

Export HTML email templates, React/Vue static snapshots, API response previews, and documentation snippets as shareable PDFs.

Business

Generate invoices, quotes, reports, and certificates from HTML templates without a backend PDF service.

Getting a Clean PDF From Your HTML

This converter lays your HTML out in a hidden frame, captures it the way a screenshot would, and places that capture on the pages. Knowing that makes most results predictable.

Design for about 800 px

At scale 1.0 the page is laid out 800 px wide; at 2.0 it is 1600 px wide and everything looks half the size on paper. Raise the scale to fit a wide table, lower it to make small text bigger.

Pages are cut at a fixed height

Long content is sliced into page-sized strips, so a table row or a line of text can fall across two pages. Landscape, a larger scale or a little extra spacing before a heading usually fixes it.

Text becomes part of the image

The PDF looks like the page you see in the preview, but its text cannot be selected or searched. When you need selectable text, open the HTML in your browser and use Print → Save as PDF.

Keep images and fonts reachable

Images and web fonts from other sites only appear when that site allows cross-origin requests. Embedding them as data: URLs, or using system fonts, always works.

Keep a coloured page background

With "Include background graphics" off, the page behind your content is printed plain white. Turn it on to keep your own background colour. Colours on elements — table headers, badges, buttons — print either way.

Preview before you convert

The live preview uses the same HTML and CSS, so broken layouts, missing images or a stray wide element show up there first — much faster than downloading a PDF to check.

What is HTML to PDF Conversion?

HTML to PDF conversion transforms web markup — the same HTML and CSS browsers use to render pages — into a portable, print-ready PDF document. Unlike printing from Chrome's menu, a dedicated HTML to PDF converter gives you control over page size, margins, headers, and batch-friendly workflows while preserving layout fidelity for archives, email attachments, and client deliverables.

ToolAdda runs conversion entirely in your browser using html2canvas and jsPDF. Your markup is never uploaded to our servers — ideal for proprietary templates, customer data in invoices, and internal reports.

How to Convert HTML to PDF Online

  1. Choose input — URL (CORS-permitted), paste HTML, or upload .html file.
  2. Configure — page size (A4/Letter/Legal), orientation, margins, scale.
  3. Advanced — headers, footers, page numbers, JS wait, background graphics.
  4. Preview — toggle live preview to verify layout.
  5. Convert & download — one click, instant PDF.

Convert Webpage URL to PDF

The URL to PDF tab fetches publicly accessible HTML when the target site allows cross-origin requests (CORS). This works for many static pages, documentation sites, and your own deployed apps. When fetch is blocked — common on major commercial sites — save the page as HTML (Ctrl+S) and upload it, or copy View Source into the paste editor. We show a clear error instead of a blank PDF so you know exactly what to do next.

For production URL-to-PDF at scale, consider a server-side renderer (Puppeteer, wkhtmltopdf). ToolAdda targets quick, private, client-side conversion without API keys or subscriptions.

Convert HTML Code to PDF

Paste full documents or fragments — invoices, tickets, newsletters, certificates. Inline <style> blocks are extracted and applied. Linked stylesheets load when CORS permits. The monospace editor supports multi-line templates from your CMS, email builder, or IDE. Use scale and margin controls to fit wide tables or responsive layouts onto standard paper.

Convert HTML File to PDF

Upload saved .html files from your computer — exported reports, "Save Page As" archives, or generator output. Filename auto-fills the output PDF name. Perfect when you already have HTML on disk and want a PDF without opening a browser print dialog.

HTML to PDF with CSS Support

CSS drives PDF fidelity. ToolAdda renders your HTML in an off-screen container, applies styles, waits for images, then captures pixels. Supported: fonts (system/web-safe), colors, borders, padding, basic flex/grid (with limits), background colors, and images. Complex CSS (advanced filters, exotic fonts without fallbacks) may simplify — always preview before sending to clients.

Enable Include background graphics for colored sections and hero banners. Use print-oriented CSS (@media print) in your source for best results — our capture respects authored styles.

HTML to PDF with JavaScript Support

JavaScript execution is limited compared to a full headless browser. Static HTML converts best. For charts, counters, or lazy-loaded content, increase JS wait time (milliseconds) before capture so async rendering completes. Single-page apps may need a pre-rendered HTML snapshot rather than live JS bundles.

Page Size, Margins, Orientation Explained

  • A4 (210×297 mm) — international standard for reports and EU documents.
  • Letter (216×279 mm) — US default for business correspondence.
  • Legal (216×356 mm) — contracts and legal filings in the US.
  • Portrait vs landscape — choose based on table width or chart orientation.
  • Margins — breathing room for binding and headers/footers (0–40 mm).
  • Scale — shrink or enlarge content to fit more data per page.

Common Business Use Cases

Finance exports HTML ledger views to PDF for auditors. HR converts offer letter HTML to signed PDF attachments. Marketing saves campaign landing page HTML as offline proof copies. Operations archives checklist HTML from internal tools. Sales generates branded quote PDFs from CRM HTML templates — all without sending data to third-party conversion APIs.

Invoice and Report Generation

Many invoicing systems export HTML. Paste the markup, set A4 portrait, add a footer with your company name and page numbers, download a PDF ready for email or password protection before sending to clients.

Website Archiving

Preserve snapshots of terms pages, pricing tables, or blog posts. Upload saved HTML or fetch CORS-enabled documentation. Store PDFs in compliance archives with timestamps in footers.

Developer Use Cases

  • PDF snapshots of HTML email templates before send.
  • Export API/HTML fixture outputs for QA regression baselines.
  • Generate PDFs from README or docs HTML in CI (manual step via saved file).
  • Quick share of UI mockup HTML with stakeholders who prefer PDF.
  • Test print CSS without deploying a headless Chrome service.

HTML to PDF Without Browser Print

Browser Print → Save as PDF works but offers inconsistent margins, no batch headers, and manual steps. ToolAdda automates capture with repeatable settings — same output every time. Compare to Adobe's online tools (upload required) or PDFCrowd/PDFShift (API billing). Our client-side approach wins on privacy and zero configuration for ad-hoc conversions.

Mobile HTML to PDF Conversion

Paste HTML from mobile clipboard, upload files from iOS Files or Android Downloads, adjust settings with touch-friendly controls, download PDF to your device. Useful for field teams capturing HTML reports from web apps into shareable PDFs on the go.

Privacy and Security

Your HTML stays on your device. PDF libraries load from CDN on first convert but your content is never transmitted to ToolAdda. Close the tab to clear memory. For regulated industries, this beats cloud converters that temporarily store your markup on unknown infrastructure.

Why Choose Our HTML to PDF Converter?

vs Adobe / Smallpdf

No upload required. Three input modes, live preview, advanced page settings — free.

vs PDFCrowd / PDFShift

No API key for one-off jobs. Instant browser UI for humans, not just developers.

vs browser Print

Repeatable margins, headers, footers, page numbers, and multi-page slicing.

Chain with Compress PDF, Merge PDF, Watermark PDF, or Protect PDF after conversion.

HTML to PDF — Frequently Asked Questions

How do I convert HTML to PDF?

Paste HTML, upload a file, or fetch a URL → configure settings → Convert to PDF → download.

Can I convert a webpage URL to PDF?

Sometimes. Your browser fetches the URL directly, so it only works when that site allows cross-origin requests, and many do not. When a URL is refused, save the page with Ctrl+S and upload the HTML file, or paste the source instead.

Can I paste HTML code?

Yes. Paste a complete document or just a fragment — a table, an invoice body, a styled div — and any CSS you include inline or in a style tag is applied before the PDF is rendered.

Can I upload an HTML file?

Yes. Both .html and .htm files are accepted, including pages saved from a browser. Styles inside the file are applied; external stylesheets load only if the server hosting them permits cross-origin requests.

Does it support CSS?

Yes. Inline styles, style tags and linked stylesheets all apply, the last only when the host allows cross-origin requests. Rules inside a @media print block are respected, which is the reliable way to control page breaks.

Does it support JavaScript?

Partially. Scripts in the page can run, and the JS wait time setting gives them a moment to finish before the PDF is captured, but anything that loads content asynchronously may not be ready in time. Static HTML converts most reliably.

Can I choose page size?

Yes — A4, US Letter or Legal, each in portrait or landscape. Wide tables usually come out better in landscape, or with a CSS transform scaling them down to the page width.

Can I add headers and footers?

Yes. Header and footer text are both optional, can be set independently, and automatic page numbers can be added alongside them. Whatever you set repeats on every page of the output.

Can I convert HTML to PDF on a phone?

Yes. Paste your HTML or pick a saved .html file from your phone, choose the page size, and the finished PDF downloads like any other file. The URL field has the same cross-origin limits as on desktop.

Is this HTML to PDF converter free?

Yes, completely — no sign-up, no trial, no conversion limit and no watermark on the PDF. The site runs on advertising rather than a paid tier.

Is my data secure?

Your HTML never reaches ToolAdda. Pasted code and uploaded files are rendered into a PDF inside your own browser, so invoice templates and internal pages stay on your machine.

Are files deleted automatically?

There is nothing to delete, because nothing is stored. Your HTML exists only in the tab's memory while you work; closing or reloading the tab clears it, and no copy is written to a server.

Do I need to install software?

No. A current Chrome, Edge, Firefox or Safari is all that is needed on desktop or mobile — no app, no extension and no desktop PDF printer driver.

Can I convert invoices to PDF?

Yes, and it is one of the commonest uses: paste the invoice HTML, pick A4 or Letter, and download. If you want to build an invoice rather than convert one, the Offline Invoice Generator handles line items, tax and totals.

Can I save webpages for offline reading?

Yes. Save the page from your browser with Ctrl+S, then upload that HTML file here to get a PDF you can keep and read anywhere, with no connection needed.

Can I convert website to PDF on mobile?

Yes, with the same caveat as on desktop: a live URL only converts when that site allows cross-origin requests. Saving the page first and picking the file from your phone works every time.

Is my HTML uploaded to a server?

No. Rendering happens entirely in your browser tab. The only network request the tool ever makes is the one you trigger yourself by entering a URL for it to fetch.