Skip to main content

HTML to PDF API
for Developers

Generate a PDF from HTML with a single API request.
PDFBolt uses Chrome to render responsive layouts with modern CSS, JavaScript, and web fonts. 50 free PDFs per month. No credit card required. EU‑based processing.

Get Started FreeJoin with Google

2M+

PDFs Generated

2K+

Developers

99.9%

Uptime SLA

~ 2s

Avg render time

From HTML to PDF in One API Call

No HTML to PDF libraries to install or headless browsers to manage.
Send your HTML and get a PDF back. PDFBolt handles Chrome rendering and scaling for you.

Chrome Rendering Engine

Your HTML renders in a real Chrome instance. Support for CSS Grid, Flexbox, web fonts, and JavaScript gives you responsive HTML to PDF rendering that preserves the look of your page.

Simple REST API

Send Base64-encoded HTML to the Direct, Sync, or Async endpoint. Use REST examples or our Node.js, Python, and PHP SDKs. Connect AI tools via our MCP server.

Privacy-First Processing

PDFBolt processes your HTML on EU‑based servers and supports GDPR compliance. Your HTML is no longer stored in request logs once processing is complete.

Built to Scale

99.9% uptime SLA with auto‑scaling infrastructure that handles traffic spikes. Same fast response whether you convert 10 or 10,000 documents a day. No servers to manage.

Clear Pricing

Start with our free HTML to PDF API with 50 conversions per month. Upgrade to a paid plan when you need more. No hidden fees. Only successful conversions count.

Responsive Support

Get technical answers from our engineers, not chatbots. For integration help, see our detailed HTML to PDF API documentation and quick-start guides for developers.

Three HTML to PDF API Endpoints

Use Direct to get the PDF in the response, Sync to get a download link, or Async to process PDFs in the background.
All three use the same Chrome engine and offer the same PDF customization options.

Direct Endpoint

Convert HTML to PDF in a single HTTPS request and get the PDF directly in the response. Perfect for real‑time downloads or in‑browser previews when the user is waiting.

Sync Endpoint

Generate a PDF and share it with your users via a download link valid for 24 hours. For more control over storage, PDFBolt can upload the PDF directly to your own S3-compatible bucket.

Async Endpoint

Submit a request. When the conversion finishes, PDFBolt sends the result to your webhook as HMAC‑signed JSON. Ideal for long-running conversions and batch jobs.

Convert HTML to PDF in Any Language

Use the official Node.js SDK, Python SDK, and PHP SDK, or copy REST examples for Java, C#, Go, Rust, and cURL.
Choose the Direct, Sync, or Async endpoint and start converting HTML to PDF. Quick Start

endpoints
const fs = require('fs');

async function generatePdf() {
    const htmlContent = '<html><body><h1>Hello!</h1><p>This is a sample PDF.</p></body></html>';
    const base64Html = Buffer.from(htmlContent).toString('base64');

    const response = await fetch('https://api.pdfbolt.com/v1/direct', {
        method: 'POST',
        headers: {
            'API-KEY': 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
            html: base64Html,
            format: "A4",
            printBackground: true,
            margin: {
                top: "30px",
                left: "30px"
            }
        })
    });

    if (!response.ok) {
        const errorText = await response.text();
        throw new Error(`HTTP ${response.status} - ${errorText}`);
    }

    const pdfBuffer = await response.arrayBuffer();
    fs.writeFileSync('document.pdf', Buffer.from(pdfBuffer));
    console.log('PDF generated successfully');
}

generatePdf().catch(console.error);

Automate HTML to PDF Generation

Add HTML to PDF conversion to your n8n, Make, or Zapier workflows.
Follow the step‑by‑step guide for your platform to generate PDFs automatically.

n8n

HTML Templates for Recurring Documents

Same layout, different data? Create your HTML template once.
Then generate invoices, reports, or contracts by sending just the template ID and JSON data.

Visual Template Designer

Design HTML/CSS layouts with real‑time preview, syntax highlighting, and error detection. Generate a test PDF.

Annual Business Report - HTML to PDF Template

Let AI Build Your Templates

Skip the coding. Describe your document layout and attach reference files.
AI generates a complete HTML template with sample data for you, ready to edit or use.

Start with a Prompt

Describe your layout, data fields, and styling. Attach reference files – PDFs, images, or code.

AI Generates Code & Data

AI creates a complete HTML/CSS template with Handlebars variables and sample data.

Edit with AI Assist

Request changes – layout, fields, styling. AI handles the code updates. Iterate until satisfied.

Review & Accept

See what changed in diff view. Compare PDF output side by side, then accept or reject – full control.

Get API Code

Copy ready-to-use code snippets in your language. Integrate in minutes.

Generate Template with AI

5 generations left

Describe the template you want to create. Be specific about layout, styling, and data fields.

0 / 10,000 characters

Drag & drop, click to browse, or paste (Ctrl+V)

PDF, PNG, JPG, JPEG, SVG, TXT, HTML, HTM, CSS, JS, JSON (max 5 files, 5 MB total)

0 KB / 5 MB

Cancel
Back
Generate with AI
Template
Data
Options

Invoice Template

History
Save
Publish
Exit
Get API Code
Quick HTML Preview
Real PDF Preview
Invoice Template Preview
Template
Data
Options

Invoice Template

History
Save
Publish
Exit
Get API Code
Quick HTML Preview
Real PDF Preview
1
<!DOCTYPE html>
2
<html lang="en">
3
<head>
4
<link href="https://fonts.googleapis.com/css2?family=Inter&display=swap" rel="stylesheet">
5
<style>
6
body { font-family: Inter, sans-serif; }
7
.invoice-title { color: #0C8AE5; font-size: 48px; }
8
.billing-section { display: flex; gap: 30px; }
9
.billing-column { border-left: 3px solid #0C8AE5; }
10
.items-table { background: #0C8AE5; color: white; }
11
.total-final { background: #0C8AE5; }
12
</style>
13
</head>
14
<body>
15
<div class="header">
16
<div class="logo">{{company.logo}}</div>
17
<div class="invoice-title">INVOICE</div>
18
</div>
19
<div class="invoice-meta">
20
<p>Invoice No: {{invoice_number}}</p>
21
<p>Issue Date: {{issue_date}}</p>
22
</div>
23
<div class="billing-section">
24
<div class="billing-column">
25
<h3>Bill From</h3>
26
<p>{{company.name}}</p>
27
</div>
28
<div class="billing-column">
29
<h3>Bill To</h3>
30
<p>{{client.name}}</p>
31
</div>
32
</div>
33
<table class="items-table">
34
{{#each items}}
35
<tr><td>{{description}}</td><td>{{total}}</td></tr>
36
{{/each}}
37
</table>
38
<div class="totals">
39
<div class="totals-row">Subtotal: {{subtotal}}</div>
40
<div class="totals-row">Tax: {{tax_amount}}</div>
41
<div class="totals-row total-final">Total: {{total}}</div>
42
</div>
43
</body>
44
</html>
Invoice Template Preview

AI Assistant

4 generations left
This will use 1 AI generation. Your template and sample data will be updated based on your instructions.

Describe what you want to change:

Thinking

0 / 10,000 characters

Drag & drop, click to browse, or paste (Ctrl+V)

PDF, PNG, JPG, JPEG, SVG, TXT, HTML, HTM, CSS, JS, JSON (max 5 files, 5 MB total)

Cancel
Prepare Changes

Review AI Changes

Code
PDF Preview
Template
Data
Parameters
Before
4
<style>
5
body { font-family: Inter; }
6
.invoice-title { color: #1e40af; }
7
.header { padding: 20px; }
8
.billing-section { margin: 30px 0; }
9
.items-table { background: #1e40af; }
10
.total { background: #1e40af; }
11
</style>
12
</head>
13
<body>
14
<div class="invoice">
15
<div class="header">
After
4
<style>
5
body { font-family: Inter; }
6
.invoice-title { color: #145E6D; }
7
.header { padding: 20px; }
8
.billing-section { margin: 30px 0; }
9
.items-table { background: #145E6D; }
10
.total { background: #145E6D; }
11
.qr-code { display: flex; }
12
.qr-label { color: #6b7280; }
13
</style>
14
</head>
15
<body>
16
<div class="invoice">
17
<div class="header">

Before (Current)

1

/

1

Before (Current)

After (AI-edited)

1

/

1

After (AI-edited)
Reject
Accept
Template
Data
Options

Invoice Template

History
Save
Publish
Exit
Get API Code
Quick HTML Preview
Real PDF Preview
1
<!DOCTYPE html>
2
<html lang="en">
3
<head>
4
<link href="https://fonts.googleapis.com/css2?family=Inter&display=swap" rel="stylesheet">
5
<style>
6
body { font-family: Inter, sans-serif; }
7
.invoice-title { color: #0C8AE5; font-size: 48px; }
8
.billing-section { display: flex; gap: 30px; }
9
.billing-column { border-left: 3px solid #0C8AE5; }
10
.items-table { background: #0C8AE5; color: white; }
11
.total-final { background: #0C8AE5; }
12
</style>
13
</head>
14
<body>
15
<div class="header">
16
<div class="logo">{{company.logo}}</div>
17
<div class="invoice-title">INVOICE</div>
18
</div>
19
<div class="invoice-meta">
20
<p>Invoice No: {{invoice_number}}</p>
21
<p>Issue Date: {{issue_date}}</p>
22
</div>
23
<div class="billing-section">
24
<div class="billing-column">
25
<h3>Bill From</h3>
26
<p>{{company.name}}</p>
27
</div>
28
<div class="billing-column">
29
<h3>Bill To</h3>
30
<p>{{client.name}}</p>
31
</div>
32
</div>
33
<table class="items-table">
34
{{#each items}}
35
<tr><td>{{description}}</td><td>{{total}}</td></tr>
36
{{/each}}
37
</table>
38
<div class="totals">
39
<div class="totals-row">Subtotal: {{subtotal}}</div>
40
<div class="totals-row">Tax: {{tax_amount}}</div>
41
<div class="totals-row total-final">Total: {{total}}</div>
42
</div>
43
</body>
44
</html>
Invoice Template Preview

API Integration: Invoice

Use the following code examples to generate PDFs using this template through our API.

NODE FETCH
NODE AXIOS
PYTHON
CURL
JAVA
C#
PHP
GO
RUST
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
const fs = require('fs'); async function generatePdf() { const response = await fetch('https://api.pdfbolt.com/v1/direct', { method: 'POST', headers: { 'API-KEY': 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', 'Content-Type': 'application/json' }, body: JSON.stringify({ templateId: "your-ai-generated-template-id", templateData: { invoice_number: "INV-2026-0112", issue_date: "January 15, 2026", due_date: "February 15, 2026", company: { name: "Creative Studio Co.", email: "[email protected]" }, client: { name: "Green Leaf Cafe", email: "[email protected]" }, items: [ { description: "Logo Design", quantity: 1, unit_price: "350.00", total: "350.00" }, { description: "Business Card Design", quantity: 1, unit_price: "120.00", total: "120.00" }, { description: "Brand Style Guide", quantity: 1, unit_price: "170.00", total: "170.00" }, { description: "Social Media Graphics", quantity: 5, unit_price: "40.00", total: "200.00" } ], currency: "$", subtotal: "840.00", tax_rate: "10", tax_amount: "84.00", total: "924.00", qr_code_data: "https://pay.creativestudio.co/INV-2026-0112" } }) }); if (!response.ok) { const errorText = await response.text(); throw new Error(`HTTP ${response.status} - ${errorText}`); } const pdfBuffer = await response.arrayBuffer(); fs.writeFileSync('pdfbolt_example.pdf', Buffer.from(pdfBuffer)); console.log('PDF generated successfully'); } generatePdf().catch(console.error);

Close

Generate PDFs and Manage Templates with MCP

Connect ChatGPT, Claude, Claude Code, or Codex to PDFBolt’s MCP server. Generate a PDF from HTML, or ask your assistant to create or update a template and preview it before publishing.

View MCP Setup Guide

Built for Invoices, Reports, Certificates, Contracts, and More

Ready-made PDF templates for the documents teams generate every day.
Each template includes Handlebars variables and sample data. Use your own data and generate PDFs.
Modern invoice with QR code template preview

Invoices

Branded invoices with dynamic line items, totals breakdown, QR payment codes, and customizable footers.

Invoice

Browse the full template gallery – ready-made layouts for receipts, healthcare, HR, resumes, quotes, shipping labels, and more.

Browse template gallery

All-in-One Dashboard

Design HTML templates, test PDF generation, monitor API usage, and manage your team. Everything in one place.

PDF Generation Playground

Paste your HTML, adjust the conversion settings, and preview the PDF. You can also merge or compress existing PDFs.

PDFBolt HTML to PDF playground for testing HTML conversion with live PDF preview

Trusted by Developers Worldwide

See how teams save time and reduce complexity with our developer‑first PDF solution.

"It has a very intuitive User Interface and easy to use API with a great documentation. What's best, that the support is super fast and even feature requests are discussed and implemented in just a couple of days. It helps us to create individualised PDF gift cards both for digital use as well as print production on the base of modern HTML / CSS."

David Bernhard

David Bernhard

CTO at bon-bon.de

"Amazingly, the owner personally helped solve the issues I was having creating an exported lesson plan with hyperlinks and complex styling. This is a great piece of software. But more importantly, it’s the people behind a product that truly make a company great. His willingness to support my project without payment is truly unique – a rare product and a rare individual. This product just works. Thank you, PDFBolt!"

Robert Reich-Storer

Robert Reich-Storer

Owner of Rhythmstix and Assessify
Source logo

"There's a lot of products that convert to PDF out there, but this one stood out to me, because the output quality is good, it's very easy to use, and pay per use. I also love the interactive API documentation, my request just worked out of the box in my app. And of course the focus on privacy, which is important when working with GDPR data. (...) PDFBolt just works, so I can focus on the business logic."

Malte Bartels

Malte Bartels

Cloud Engineer
Source logo

PDFBolt is a PDF Association Member

PDFBolt is a member of the PDF Association, the worldwide technical community for PDF technology. Membership connects us with experts working on PDF standards for archiving, accessibility, and print.

View PDFBolt Profile
PDF Association Member logo

Simple and Transparent Pricing

Start with 50 free HTML to PDF conversions per month.
Upgrade when you need more. No hidden fees.

Free

50 documents / month

20 requests per minute

1 concurrent request

PDF file size limit: 2MB

All customization options

1 template

1 AI template generation

PDF Tools API (merge, compress)

No credit card required

Get Started

Basic

$19

/month

2,000 documents / month

100 requests per minute

5 concurrent requests

$0.01 per overage PDF

Unlimited PDF file size

All customization options

Async processing

Upload to S3

3 team members

10 templates

10 AI template generations / month

PDF Tools API (merge, compress)

Get Started
Recommended

Growth

$79

/month

10,000 documents / month

250 requests per minute

20 concurrent requests

$0.008 per overage PDF

Unlimited PDF file size

All customization options

Async processing

Upload to S3

10 team members

Unlimited templates

50 AI template generations / month

Print production (PDF/X, CMYK)

PDF Tools API (merge, compress, convert to PDF/X)

Priority support

Get Started

Enterprise

$249

/month

50,000 documents / month

500 requests per minute

50 concurrent requests

$0.005 per overage PDF

Unlimited PDF file size

All customization options

Async processing

Upload to S3

Unlimited team members

Unlimited templates

150 AI template generations / month

Print production (PDF/X, CMYK)

PDF Tools API (merge, compress, convert to PDF/X)

We create custom templates for you

Top priority support

Get Started

Looking for higher monthly limits?

Contact Us →

Frequently Asked Questions

Got questions about our HTML to PDF converter? We've got answers.
From API integration to customization options, templates, security, and pricing.

No html2pdf libraries to install. Encode your HTML as Base64 and send it to the PDFBolt API with your API key. Use Direct to get the PDF in the response or Sync to get a download link. For background processing, Async returns a request ID and sends the result to your webhook when the conversion finishes.
The free plan includes 50 document conversions per month. No credit card required. You get the same Chrome rendering engine and can customize page size, margins, headers, and footers. Paid plans start at $19/month and include higher limits, async processing, and uploads to your own S3-compatible bucket. Only successful conversions count toward your usage. See our pricing page for full plan details.
Control every aspect of your PDF output: page size, margins, orientation, headers, footers, and page numbers. Configure JavaScript, set the viewport size, and wait for dynamic content to load before generating the PDF. For print, generate PDF/X-4 or PDF/X-1a files and choose an ICC profile for CMYK conversion. See all API parameters.
Yes. PDFBolt uses Chrome to run JavaScript and render single-page apps built with React, Vue, or Angular. Before generating the PDF, you can wait for a page load event with waitUntil, a JavaScript condition with waitForFunction, or a specific element with waitForSelector. Use isMobile to emulate a mobile viewport. See Page Parameters for details.
Yes. Create an HTML template with Handlebars variables and publish it. To generate a PDF, send the template ID and your JSON data to the API. You can track versions, collaborate with your team, or use AI to generate a template from a description and reference files. You can also manage templates through the PDFBolt MCP server. Browse ready-made layouts in our Template Gallery.
Yes. PDFBolt can generate print-ready PDF/X-1a and PDF/X-4 files directly from HTML. It supports CMYK color conversion and embedded ICC profiles, including FOGRA39, FOGRA51, SWOP, and GRACoL. See the print production parameters for setup details.
Rendering a PDF from HTML takes about 2 seconds on average. External fonts, large images, and JavaScript can increase render time. For batch jobs, use the Async endpoint to process conversions in the background and receive the results via webhook.
Yes. On paid plans, you can submit conversion requests in parallel through the Async endpoint. PDFBolt scales automatically to handle traffic spikes and sends an HMAC-signed webhook notification when each conversion finishes. You can also have PDFBolt upload the PDFs directly to your own S3-compatible bucket.
PDFBolt uses HTTPS and processes your documents on EU‑based servers to support GDPR compliance. We use your HTML only to generate the PDF. Once processing is complete, we no longer store your HTML in our request logs. You can also have PDFs delivered directly to your own S3-compatible bucket. See our Privacy Policy and DPA for details.
No. PDFBolt is a hosted HTML to PDF converter accessible through a REST API. There are no libraries like wkhtmltopdf or Puppeteer to install, update, or maintain on your servers. Send an API request and get a PDF back. Works with any programming language that can make HTTP calls. Use the official Node.js SDK, Python SDK, or PHP SDK for helper methods and automatic HTML encoding, or follow our REST examples for Java, C#, Go, Rust, and cURL.
Self-hosting Puppeteer or Playwright means keeping Chrome up to date, managing CPU and memory usage, and scaling your servers when traffic spikes. PDFBolt handles browser updates and auto-scaling for you, with predictable pricing and a 99.9% monthly uptime SLA. See our Puppeteer comparison for details.

Convert HTML to PDF with
our Privacy‑First API

Generate PDFs on EU‑based servers without having to run Chrome yourself.
Start with 50 free conversions per month. No credit card required.

Register for Free