HTML to PDF API
that just works

Puppeteer leaks memory. wkhtmltopdf breaks your CSS. LightningPDF just works.

One API call. Any HTML/CSS. Pixel-perfect PDF.Go-native engine under 100ms, Chromium for complex layouts. Free tier included.

50 free PDFs/month. No credit card required.

How It Works

1

Design your template

Use our visual designer or bring your own HTML/CSS. Variables make content dynamic.

2

Call the API with your data

One POST request with your HTML or template ID. Works with any language that speaks REST.

3

Receive a pixel-perfect PDF

Get your PDF in milliseconds. Download directly, store in S3, or receive via webhook.

Built for These Use Cases

🧾

Invoices & Billing

Automate invoice generation for SaaS, e-commerce, and subscription platforms. Pixel-perfect every time.

📊

Reports & Dashboards

Turn HTML dashboards into shareable PDFs. Charts, tables, and data visualizations rendered faithfully.

📄

Contracts & Legal Docs

Generate contracts, NDAs, and compliance documents programmatically with template variables.

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

Design templates visually with live preview — no code required. Use variables for dynamic content and apply consistent branding with themes.

  • Real-time preview as you edit
  • Type-safe Go templates
  • Custom themes & branding

Powerful REST API

Integrate PDF generation into any stack with a single HTTP call. Works with every language that speaks REST.

  • Python, Node.js, Go, PHP, cURL
  • Async jobs & batch generation
  • Under 100ms for simple docs
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
Visual template designer
Free tier included
Tailwind CSS built-in
Markdown support
Async job queue
Batch generation API
Webhook notifications

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?
Self-hosting is on our roadmap. Contact us at hello@lightningpdf.dev if you're interested in early access.

Stop shipping Puppeteer to production. Start free — 50 PDFs/month, no card needed.