Pay-per-use · No subscriptions

Convert Any URL to PDF via API

Pass a URL, receive a downloadable PDF. Full JavaScript rendering.

HTML2DocHub visits the URL with a real Chromium browser, waits for all JavaScript to execute, and captures a pixel-perfect PDF. SSRF protection prevents attacks. Pay per page rendered.

Why developers choose HTML2DocHub

Pass any public URL — we render it with Chromium
Full JavaScript execution — SPA frameworks work perfectly
Waits for network idle before capture
SSRF protection — private IPs are blocked
Custom cookies and headers for authenticated pages
Custom viewport and media type (screen/print)
A4, Letter, custom page formats
Pay per page — nothing to host or maintain

Code Examples

URL to PDFcurl
curl -X POST https://api.html2dochub.com/v1/render \
  -H "X-API-Key: sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "pdf",
    "url": "https://example.com/report/2026-q1",
    "options": {
      "format": "A4",
      "print_background": true,
      "margin_top": "1cm",
      "margin_bottom": "1cm"
    }
  }'
Python – URL to PDF with auth cookiespython
import requests

resp = requests.post(
    "https://api.html2dochub.com/v1/render",
    headers={"X-API-Key": "sk_live_YOUR_KEY"},
    json={
        "type": "pdf",
        "url": "https://yourapp.com/dashboard/report",
        "options": {
            "format": "A4",
            "cookies": [
                {"name": "session", "value": "abc123", "domain": "yourapp.com"}
            ],
            "extra_headers": {"Authorization": "Bearer your-token"},
        },
    },
)
print(resp.json()["download_url"])

Simple, transparent pricing

Pay only for pages rendered. No subscriptions. No minimum monthly fee.

1 page PDF:~₹0.10
10 page PDF:~₹0.80
100 pages/day:~₹8/day
See full pricing details

Frequently Asked Questions

Can I render authenticated pages?+
Yes. Pass `cookies` or `extra_headers` in the options object to authenticate the page request.
What if the page has JavaScript redirects?+
We follow redirects and wait for network idle, so JavaScript-driven navigation is fully supported.
Are there any URLs that won't work?+
Private/internal IPs (127.0.0.1, 192.168.x.x, 10.x.x.x) are blocked for security. Public internet URLs work.

Start rendering PDFs today

Free account. No credit card required. API ready in minutes.

Get your free API key