Stop wrestling with Puppeteer, wkhtmltopdf, and headless Chrome
HTML to PDF API
that just works
One API call. Any HTML/CSS. Pixel-perfect PDF back in <100ms. Go-native engine for invoices and reports, Chromium for complex layouts. Free tier included.
50 free PDFs/month. No credit card required.
Two Ways to Generate PDFs
Design templates visually or send HTML via API. Either way, you get production-ready PDFs in milliseconds.
Visual Template Designer
Our intuitive visual editor allows you to design templates without writing code. See changes in real-time with live preview.
Real-time Preview
- See changes instantly as you design your templates with live preview.
Type-safe Templates
- Leverage Go's type system to create robust templates with compile-time safety.
Custom Themes
- Apply consistent branding with customizable themes across all your documents.
Powerful REST API
Integrate PDF generation into your applications with our simple REST API. Handle high-volume workloads with ease.
RESTful API
- Simple, intuitive API endpoints for all your PDF generation needs.
Any Language
- Call our REST API from Python, Node.js, Go, PHP, or any language that speaks HTTP.
High Performance
- Generate thousands of PDFs per minute with our Go-native and Chromium rendering engines.
curl -X POST https://lightningpdf.dev/api/v1/pdf/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"template_id": "invoice-001",
"data": {
"company": "Acme Corp",
"items": [{"name": "Service", "price": 850}]
}
}'Generate PDFs in Seconds
One API call is all it takes. Choose your language.
curl -X POST https://lightningpdf.dev/api/v1/pdf/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"html": "<h1>Hello World</h1><p>My first PDF</p>",
"options": { "format": "A4" }
}'import requests
resp = requests.post(
"https://lightningpdf.dev/api/v1/pdf/generate",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"html": "<h1>Hello World</h1>",
"options": {"format": "A4"}
}
)
pdf_data = resp.json()["data"]["pdf"]const resp = await fetch(
"https://lightningpdf.dev/api/v1/pdf/generate",
{
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
html: "<h1>Hello World</h1>",
options: { format: "A4" }
})
}
);
const { data } = await resp.json();body := `{"html":"<h1>Hello</h1>","options":{"format":"A4"}}`
req, _ := http.NewRequest("POST",
"https://lightningpdf.dev/api/v1/pdf/generate",
strings.NewReader(body))
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)How We Compare
See why developers choose LightningPDF.
| Feature | LightningPDF | CraftMyPDF | PDFShift |
|---|---|---|---|
| HTML + CSS to PDF | ✓ | ✓ | ✓ |
| Markdown support | ✓ | ✗ | ✗ |
| Visual template designer | ✓ | ✓ | ✗ |
| Async job queue | ✓ | ✗ | ✗ |
| Webhook notifications | ✓ | ✗ | ✓ |
| Batch generation API | ✓ | ✗ | ✗ |
| Free tier included | ✓ | ✓ | ✓ |
| Tailwind CSS built-in | ✓ | ✗ | ✗ |
| Self-hostable | ✓ | ✗ | ✗ |
Simple Pricing
Start free. Scale as you grow.