Convert Any HTML to Perfect PDFs

HTML to PDF API.

Convert any HTML content or URL to a pixel-perfect PDF document. Supports full CSS styling, custom page sizes, headers, footers, and JavaScript rendering. Generate invoices, reports, tickets, and more.

Free tier, no card< 200ms responses99.9% uptime SLA
GET/v1/htmltopdflive
Response200 OK · sample
{
  "status": "ok",
  "error": null,
  "data": {
    "marginLeft": "0.4in",
    "marginRight": "0.4in",
    "marginTop": "0.4in",
    "marginBottom": "0.4in",
    "landscape": false,
    "pdfName": "c064eacc-c29f-43a1-8375-a4b2562ea9d8.pdf",
    "expires": 1766096665366,
    "downloadURL": "https://storage.googleapis.com/apiverve-helpers.appspot.com/htmltopdf/c064eacc-c29f-43a1-8375-a4b2562ea9d8.pdf?GoogleAccessId=1089020767582-compute%40developer.gserviceaccount.com&Expires=1766096665&Signature=R%2Ft%2FXcR%2B8bXzCi5ztc01YeE%2Bbn1ZR%2BCyeoqgHpSB1z0LO3SetOSoWYVoon5IG4vUU9W30Rmw6owErorZal%2FHdgpmcPAYx3eTx5dPaD45tFSCgIfpRloi0DBLse%2Fzy4sb0k3XgweiHZUdZu3jKMi1HVDJa2j2ervAFfwDfxGHUDXH5wwFKqnv%2BIw%2Fu7MBsKMDCNMWYESE7Aicz6eL0Lxz8P6oazJX0akKlLDhkgKiIqF3VtjGIh36RzK4WGBpU36JFZ7SCZZGHNiHyt3%2FBdyjPRA8N1fky%2Bv%2BjR%2BTTlO9BpWcjImNJM6nvVfmICEfcbLqL2MvVldfPAFKyEv2zCrCLA%3D%3D"
  }
}
Sample response · verify to run one live call, no signup
Integrates with your favorite tools
LangChainn8nZapierMakePipedreamPower AutomatePostman

HTML to PDF API

Convert any HTML content or URL to a pixel-perfect PDF document. Supports full CSS styling, custom page sizes, headers, footers, and JavaScript rendering. Generate invoices, reports, tickets, and more.

  • Full CSS and JavaScript rendering support
  • Custom page sizes, margins, and orientations
  • Headers, footers, and page numbers
  • Password protection and watermarks
  1. 1

    Send one request

    A single authenticated GET with the location you care about — no SDK required.

    GET /v1/htmltopdf?query=
    x-api-key: your_key
  2. 2

    We do the aggregation

    Each PDF is rendered with full CSS, JavaScript, and web font support for pixel-perfect document generation.

  3. 3

    Get clean JSON back

    One structured object, typically under 200 ms — ready to render.

    { marginLeft, marginRight, marginTop, }

Everything in a single call.

Each PDF is rendered with full CSS, JavaScript, and web font support for pixel-perfect document generation.

/v1/htmltopdfapplication/json
marginLeft"0.4in"
marginRight"0.4in"
marginTop"0.4in"
marginBottom"0.4in"
landscapefalse
pdfName"c064eacc-c29f-43a1-8375-a4b2562ea9d8.pdf"
expires1766096665366
downloadURL"https://storage.googleapis.com/apiverve-helpers.appspot.c…"

What developers build with it.

Real applications shipping on this endpoint today — each with the numbers that made it worth wiring up.

See every use case

Call it in your language.

Copy a working request, or install a typed SDK. Same endpoint, same key.

const res = await fetch("https://api.apiverve.com/v1/htmltopdf", { method: "POST", headers: { "x-api-key": "YOUR_API_KEY" } });
const { data } = await res.json();
console.log(data);

One subscription, the whole convert any html to perfect pdfs stack.

Every related API ships with your key — no separate plans, no extra keys, one bill.

See pricing
8APIs in this bundle
99.9%uptime SLA

Wire it into the tools you already run.

Ready-made recipes for Zapier, Make, and n8n — trigger on an event, and the data lands where your team works.

Google Sheets
Generate PDFs from spreadsheet rows
WhenNew row added
ThenBuild HTML from row data → convert to PDF
Slack
Generate PDFs via slash command
WhenSlash command received
ThenConvert provided HTML → post downloadURL
Airtable
Generate PDF documents from records
WhenNew record created
ThenBuild HTML from record → convert to PDF
Notion
Export Notion pages as PDF
WhenPage updated
ThenFetch page content → convert to PDF
Salesforce
Generate PDF quotes from opportunities
WhenOpportunity stage changed
ThenBuild quote HTML → convert to PDF
GitHub
Generate PDF documentation from repos
WhenNew release published
ThenBuild HTML from README → convert to PDF
Browse all integrations

Questions about the API

What HTML/CSS features are supported?
We use a full Chromium-based renderer, so all modern HTML5, CSS3, and JavaScript features are supported including flexbox, grid, web fonts, and SVG.
What page sizes are available?
All standard sizes including A4, Letter, Legal, Tabloid, and custom dimensions. You can also set orientation (portrait/landscape) and margins.
Can I add headers and footers?
Yes! You can add custom HTML headers and footers with dynamic variables like page number, total pages, date, and document title.
How long are generated PDFs stored?
PDFs are available for download for 24 hours by default. Enterprise plans offer permanent storage and custom expiration times.
Is there a free tier available?
Yes! The free tier includes 1,000 API calls per month for development and testing purposes. Commercial use requires a paid plan. Check our pricing page for details.
What is the typical generation time?
Simple pages generate in 1-2 seconds. Complex pages with JavaScript and charts take 3-5 seconds. You can specify wait times for JavaScript rendering to complete.
What are the rate limits?
Rate limits vary by plan. Check our pricing page for details. Our plans support high-volume PDF generation for invoices, reports, and documents.
Can I password-protect generated PDFs?
Yes! Premium plans support password protection and encryption for generated PDFs. You can set user passwords and permissions for viewing, printing, and editing.
What is the maximum page count per PDF?
Standard plans support up to 100 pages per PDF. Enterprise plans support larger documents with thousands of pages for comprehensive reports and documentation.
Can I add watermarks to PDFs?
Yes! You can add watermarks through CSS overlays in your HTML, or use our premium watermarking feature for more advanced watermark positioning and styling.

Start building with the HTML to PDF API. Free tier, no card required — your key is live in minutes.

Bonus: 300+ more APIs

The same key unlocks every other APIVerve endpoint — reach for them when you need them.

Browse the catalog