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.
API Example
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.

FeatureLightningPDFCraftMyPDFPDFShift
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.

Free
$0
50 PDFs/mo
Starter
$9
2,000 PDFs/mo
Popular
Pro
$29
10,000 PDFs/mo
Business
$99
50,000 PDFs/mo

Frequently Asked Questions

What formats can I generate?
LightningPDF generates high-quality PDF documents from HTML, CSS, and Markdown. We use headless Chromium for pixel-perfect rendering with full Tailwind CSS support built in.
How fast is PDF generation?
Simple documents (invoices, receipts, reports) generate in under 100ms using our Go-native engine. Complex HTML/CSS layouts render in 1-3 seconds via Chromium. Our dual-engine architecture automatically picks the fastest path.
Can I use my own templates?
Yes! Create templates using our visual designer or upload your own HTML/CSS. Use variables like &#123;&#123;.name&#125;&#125; for dynamic content and our API fills them in at generation time.
Is there a free tier?
Absolutely. Generate up to 50 PDFs per month for free, forever. No credit card required to get started.
Can I self-host LightningPDF?
Yes. LightningPDF ships as a single Docker image. Run it on your own infrastructure with full control over your data.

Ready to automate your PDFs? 50 free PDFs/month. No credit card required.