HTML to PDF Converter API

Convert any HTML to a professionally rendered PDF. Free API — no signup, no API key. Paste HTML below or use the API directly from your code.

Try it — paste your HTML

API Usage

curl
Python
Node.js
Go
# Simple — send HTML as body
curl -X POST https://documint.anethoth.com/api/v1/html-to-pdf \
  -H "Content-Type: text/html" \
  -d '<h1>Invoice #1042</h1><p>Amount: $250.00</p>' \
  -o document.pdf

# JSON — with options
curl -X POST https://documint.anethoth.com/api/v1/html-to-pdf \
  -H "Content-Type: application/json" \
  -d '{"html": "<h1>Report</h1>", "page_size": "Letter", "filename": "report.pdf"}' \
  -o report.pdf
import requests

html = "<h1>Monthly Report</h1><p>Generated on 2026-04-19</p>"
resp = requests.post(
    "https://documint.anethoth.com/api/v1/html-to-pdf",
    json={"html": html, "page_size": "A4", "filename": "report.pdf"}
)
with open("report.pdf", "wb") as f:
    f.write(resp.content)
const resp = await fetch("https://documint.anethoth.com/api/v1/html-to-pdf", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    html: "<h1>Report</h1><p>Monthly summary</p>",
    page_size: "A4"
  })
});
const pdf = await resp.arrayBuffer();
// Save or send the PDF buffer
payload := `{"html": "<h1>Report</h1>", "page_size": "A4"}`
resp, _ := http.Post(
    "https://documint.anethoth.com/api/v1/html-to-pdf",
    "application/json",
    strings.NewReader(payload),
)
defer resp.Body.Close()
pdf, _ := io.ReadAll(resp.Body)
os.WriteFile("report.pdf", pdf, 0644)

Full CSS Support

Render complex layouts with CSS — flexbox, grid, custom fonts, colors, and media queries all work.

No Signup Required

Just POST your HTML and get a PDF back. No API keys, no accounts, no credit card. Free forever for basic use.

Multiple Page Sizes

Support for A4, Letter, Legal, A3, and A5 page formats. Set via the page_size parameter.

Tables & Images

HTML tables render perfectly. Inline images (base64 data URIs) and remote images are supported.

Unicode & i18n

Full Unicode support including CJK characters, RTL text, emoji, and special symbols.

Fast & Reliable

Powered by WeasyPrint. Average response time under 500ms. 99.9% uptime.

API Reference

POST /api/v1/html-to-pdf

htmlstring (required)The HTML content to convert
page_sizestringA4, Letter, Legal, A3, A5 (default: A4)
filenamestringOutput filename (default: document.pdf)

Rate limit: 10 requests/minute per IP. Max input: 500KB. Content-Type: application/json or text/html.

Frequently Asked Questions

Is this really free?

Yes. The free tier includes 10 conversions per minute with a small "Generated with DocuMint" footer. Upgrade to a paid plan for higher limits and no branding.

Does it support CSS?

Yes — inline styles, <style> blocks, and @media print rules are all supported. External stylesheets via <link> are also loaded.

Can I use this in production?

For production use, we recommend signing up for an API key. The free tier is rate-limited and includes branding. Paid plans start at $9/mo with 100 PDFs/month.

What rendering engine is used?

We use WeasyPrint, a high-quality CSS-compliant rendering engine. It produces pixel-perfect PDFs with proper page breaks, headers, and footers.

Need higher limits?

Sign up for a DocuMint API key — 10 free invoices/month, or upgrade for unlimited PDF generation.

Get Free API Key