HTML to PDF
Convert HTML into a downloadable PDF. Paste HTML markup or upload an .html file, pick a page size and font, and convert entirely in your browser: nothing is uploaded, no signup, no conversion limit.
Input
Read as UTF-8 text and dropped into the box above.
Code blocks and inline code always render in a monospace font.
White space around the page content, in points (72 pt = 1 inch).
Output
Guides
Turn HTML into a real, shareable PDF — headings, bold/italic text, lists,
tables, blockquotes, code blocks and links all render as proper page layout,
not a screenshot. Paste HTML markup or upload an .html file, pick a page
size and font, and download the result — all in your browser.
How to use it
- Paste your HTML into the box, or drop an .html file to load it there.
- Open Page options to set the page size, orientation, body font (Helvetica or Times), font size and margin.
- Press Convert to PDF, then download
document.pdf.
What renders
- Headings (
<h1>through<h6>), each at a distinct size - Bold, italic and text formatting, including combinations
- Bulleted, numbered and nested lists
- Fenced code (
<pre>/<code>) in a monospace font on a shaded background - Blockquotes, rendered indented and italic
- Tables, with column alignment preserved
- Links (clickable in the PDF) and horizontal rules
A content PDF, not a screenshot
This produces a clean, readable PDF from your HTML's structure — headings, text, lists, tables and links laid out on real pages. It isn't a pixel-perfect visual clone of a styled webpage (custom fonts, background colors, precise CSS positioning and images aren't reproduced); if your goal is an accurate document someone can read, search and print, that's exactly what this gives you, without shipping a screenshot dressed up as a PDF.
Free in your browser, private by default
The PDF is built entirely on your device — your HTML is never uploaded, there's no signup, and no cap on how many files you convert. There's no file-size limit beyond what your browser can hold in memory, and long documents automatically flow across as many pages as they need.
Is there an API?
Yes. The same tool is available as a developer API
(POST /v1/tools/html-to-pdf) for converting HTML from a script or backend
— handy for turning a generated report or email template into a
distributable PDF in CI. Send the HTML as a string; the response carries the
PDF as a data URL. The in-browser tool on this page stays free.
I have a live webpage, not HTML source
Use URL to PDF instead — give it a live URL and it fetches the page's readable content server-side and typesets it into a PDF, no HTML source needed.
I need Markdown instead of HTML as my source
Use Markdown to PDF, which lays out Markdown — including GitHub-Flavored tables, strikethrough and task lists — on the exact same page layout engine.
I need HTML from this PDF's source instead of a download
Use HTML to Markdown to get clean Markdown source from the same HTML instead of a PDF.
Use it from code
From 3 credits per callREST API
curl -X POST https://api.iotools.cloud/v1/tool/html-to-pdf \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"htmlSource": "<h1>Project Report</h1>\n<p>A short summary of th…",
"pageSize": "a4",
"orientation": "portrait",
"font": "helvetica",
"fontSize": "12",
"margin": "40"
}'Swap in your own key from your account. The tool's fields are the body — no wrapper.
Ask an AI agent
Use the IOTools `html-to-pdf` tool (HTML to PDF) on this input:
YOUR_INPUT_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.