Skip to main content
PPDF123

Convert HTML to PDF

HTML to PDF renders an uploaded .html or .htm file, or a ZIP that contains HTML, into a PDF with WeasyPrint. JavaScript does not run, so pages built by scripts come out incomplete.

Drag and drop files here, or click to choose

Accepts HTML, HTM, ZIP · up to 500.0 MB per file · up to 20 files at once

You can also paste a file with Ctrl/Cmd+V, or from the clipboard menu.

HTML to PDF renders with WeasyPrint. Upload a `.html` / `.htm` file, or a ZIP that contains at least one `.html` (`index.html` at the archive root is used if present, otherwise the first `.html` entry). The result is a PDF named after the upload.

The `zoom` field is ignored. There is no headless Chrome and no JavaScript execution. External images, stylesheets and fonts are fetched from public web addresses (at most 500 resources, 64 MiB each, 15 seconds per request), and addresses on private or internal networks are blocked. Relative assets inside a ZIP resolve from the extracted files.

CSS that WeasyPrint supports will print. Script-heavy apps, webfonts that never download, and modern JS layouts often collapse. Encrypted PDFs are not an input; this tool starts from HTML.

If the source is already a URL, use URL to PDF. If the source is Markdown, use Markdown to PDF (CommonMark then the same WeasyPrint step).

Features

  • WeasyPrint, not Chromium
  • Accepts HTML or a ZIP (index.html, or else the first .html, is rendered)
  • zoom is ignored; no JavaScript
  • Anonymous API at /api/v1/convert/html/pdf

When to use this tool

  • Print a static invoice HTML to PDF
  • Render a CSS-based report that does not need JS
  • Turn a small HTML+assets ZIP into a PDF

How do I convert HTML to a PDF?

  1. Upload an HTML file or a ZIP that includes HTML.
  2. Skip zoom; it does not change the render.
  3. Click Process and download the PDF.
  4. Check fonts and pagination. JS-only pages will look empty or broken.

Limits and edge cases

  • No JavaScript, no Chrome, no zoom
  • WeasyPrint CSS support only
  • Remote assets load only from public web addresses; private and internal addresses are blocked
  • Rendering stops after 180 seconds by default
  • Upload limit on this website: 500 MB per file, sent in chunks above about 95 MB. A single direct API request body is capped at 100 MB.

Examples

  • A semantic HTML letter with local CSS often prints cleanly
  • A create-react-app index.html without a build usually prints blank

Privacy for this tool

Files are uploaded over HTTPS, processed in memory or a short-lived temporary directory on our servers, and deleted when your result is ready. We do not keep copies for later browsing, training, or advertising profiles. See the Privacy Policy for retention details and AdSense cookie disclosures.

Frequently asked questions

Why is my React app a blank PDF?
WeasyPrint does not run JavaScript. Send static HTML, not an empty SPA shell.
Does zoom work?
No. The converter function takes no params.
How does a ZIP work?
If the archive has an index.html at its root, that file is rendered; otherwise the first .html entry is.
Is this print-to-PDF from Chrome?
No. It is WeasyPrint's HTML/CSS engine.

Last updated:

Call this from code

Every tool on this site is a plain REST endpoint - no account or API key needed for anonymous use. Built for AI agents and developers as much as for browsers.

curl -X POST "https://pdf123.xyz/api/v1/convert/html/pdf" \
  -F "[email protected]" \
  -o output.pdf

Also available as an MCP tool for agent clients that speak Model Context Protocol (JSON-RPC 2.0 over POST /mcp). Full API reference

Use it from an AI agent

Skill

Claude Code, Codex, Cursor and other AI agents can run HTML To PDF for you with this skill: /skills/pdf123-html-to-pdf.md

All agent skills

Files are used only for this processing job and deleted automatically afterward.