Skip to main content
PDF Tools

How to Convert HTML to PDF with Bitcoin Lightning

Paste raw HTML or a URL, pay 50 sats, and download a clean PDF. No account, no subscription, no file stored on our servers.

50 sats/conversionNo account requiredHTML or URL inputL402 / MCP / OpenClaw

For Humans

Use cases for individuals, businesses, and researchers

Save a webpage as a permanent PDF

Archive articles, receipts, or order confirmations before they change or disappear. Paste the URL and get a PDF snapshot you control — no browser extensions or print dialogs needed.

Create professional invoices from templates

Write your invoice as an HTML template with your branding and line items, then convert it to a polished PDF. No Adobe, no Word, no desktop software — just HTML in, PDF out.

Offline reading

Convert documentation pages or long articles to PDF for reading on flights, commutes, or anywhere without internet. Better than bookmarking — the content is yours even if the site goes down.

Legal and compliance snapshots

Capture a terms of service page, privacy policy, or regulatory disclosure as a timestamped PDF for your records. If the page changes later, you have proof of what it said when you agreed to it.

How It Works

1
Go to sats4ai.com/html-to-pdfOpen the HTML-to-PDF tool.
2
Paste HTML or a URLEnter raw HTML markup or the URL of any public webpage.
3
Pay 50 satsScan the Lightning QR with any wallet.
4
Download your PDFYour converted PDF is ready in seconds.

For Agents

Use cases for AI agents, automation pipelines, and developers

No API key needed. HTML-to-PDF uses L402 — pay-per-conversion via Lightning. Agents send HTML or a URL, receive a 402 with an invoice, pay it, and get the PDF back. Process one page or a thousand with no quota management.

Report generation pipelines

Agents generate HTML reports from data analysis, then convert them to PDF for delivery to stakeholders. No headless browser to maintain — just POST the HTML and get a PDF back.

Invoice automation

Generate HTML invoices from order data, convert to PDF, and email or store them automatically. Each conversion is a single API call — no rendering infrastructure to manage.

Web monitoring snapshots

Periodically capture webpage state as PDF for compliance auditing or competitive intelligence. Send a URL on a schedule and archive the resulting PDFs with timestamps.

Documentation builds

Convert rendered HTML documentation pages to PDF for offline distribution or client deliverables. Chain with PDF Merge to combine multiple pages into a single document.

L402 Authentication Flow

1
Send the request without authPOST HTML content or a URL to the endpoint. The server responds with HTTP 402 and a Lightning invoice.
2
Pay the invoiceThe agent pays the 50-sat Lightning invoice. Confirms in milliseconds.
3
Resend with payment proofResend the request with the payment preimage in the Authorization header. The server returns the PDF.
terminal
# Convert HTML to PDF via L402
# Step 1: Send request (returns 402 + invoice)
curl -X POST https://sats4ai.com/api/l402/html-to-pdf \
  -H "Content-Type: application/json" \
  -d '{"html":"<h1>Hello World</h1><p>This is my document.</p>"}'

# Or convert a URL to PDF:
curl -X POST https://sats4ai.com/api/l402/html-to-pdf \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/page"}'

# Step 2: Pay the Lightning invoice (50 sats)

# Step 3: Resend with payment proof
curl -X POST https://sats4ai.com/api/l402/html-to-pdf \
  -H "Content-Type: application/json" \
  -H "Authorization: L402 <token>:<preimage>" \
  -d '{"html":"<h1>Hello World</h1><p>This is my document.</p>"}'

MCP & OpenClaw

Chain with Other Services

HTML-to-PDF

Generate a formatted report or document with AI Chat, then convert the HTML output to a polished PDF for sharing or archiving.

HTML-to-PDF

Convert HTML to PDF, then email it to a recipient. 50 sats for the PDF + 200 sats for the email.

HTML-to-PDF

Extract text from a scanned document with OCR, analyze or reformat it with AI Chat, then output a clean formatted PDF.

Convert HTML to PDF — No Signup Required

50 sats per conversion. Paste HTML or a URL and get a PDF in seconds. All you need is a Lightning wallet.