HTML Render logo
UtilitiesMAINTAINED10 tokens / call

HTML Render

HTML to PDF, PNG, JPEG or WebP with headless Chromium: full CSS, web fonts and JavaScript

Convert HTML into a PDF, PNG, JPEG or WebP with one POST, rendered by headless Chromium so CSS, web fonts and JavaScript work as in a browser. Built for invoices, reports, certificates and screenshots.

Every call needs an X-Api-Key header. A free key includes 500 tokens a month, no card required. 10 tokens per call, so the free plan covers about 50 calls a month.

No credit card requiredAccess to 125+ APIsCancel anytime
response
API response example

Also available on

Production Ready
Battle-tested infrastructure with a 99.9% uptime SLA. Rate limits are generous, responses are consistent.
Simple Integration
Standard REST + JSON. Works with any HTTP client. Copy-ready code snippets in 4 languages.
One Key, 125+ APIs
Your DataAndAPIs subscription unlocks every API on the platform — anime, finance, sports, and more.

Use cases for HTML Render

  • Generate invoices, receipts and statements as PDF from an HTML template.

  • Render certificates, tickets and reports with your own CSS and fonts.

  • Produce social-sharing images or email previews as PNG from HTML.

  • Snapshot a rendered page for archiving or visual review.

HTML Render endpoints

Every endpoint with its parameters and a real example response.

POSTConvert HTML

https://html-render.dataandapis.com/v1/v1/convert

Request body

{
  "html": "<html><body><h1>Invoice #2025-001</h1><table><tr><th>Description</th><th>Qty</th><th>Total</th></tr><tr><td>HTML to PDF Conversion</td><td>10</td><td>$0.50</td></tr><tr><td>HTML to PNG Rendering</td><td>8</td><td>$0.32</td></tr><tr><td>Custom Branding</td><td>1</td><td>$4.99</td></tr></table><p>Total Due: $5.81</p></body></html>",
  "format": "pdf",
  "options": {
    "format": "A4",
    "printBackground": true,
    "margin": {
      "top": "20px",
      "right": "20px",
      "bottom": "20px",
      "left": "20px"
    }
  }
}

Example request

curl -X POST "https://html-render.dataandapis.com/v1/v1/convert" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "html": "<html><body><h1>Invoice #2025-001</h1><table><tr><th>Description</th><th>Qty</th><th>Total</th></tr><tr><td>HTML to PDF Conversion</td><td>10</td><td>$0.50</td></tr><tr><td>HTML to PNG Rendering</td><td>8</td><td>$0.32</td></tr><tr><td>Custom Branding</td><td>1</td><td>$4.99</td></tr></table><p>Total Due: $5.81</p></body></html>", "format": "pdf", "options": { "format": "A4", "printBackground": true, "margin": { "top": "20px", "right": "20px", "bottom": "20px", "left": "20px" } } }'
Example response
https://dataandapis.com/images/html-render-example.webp

Where the data comes from

Source
Headless Chromium via Puppeteer. No stored dataset.
Freshness
Rendered live on every call.

One install. Every endpoint.

No proprietary SDKs needed. Any HTTP client works. Pick your language and paste.

3languages
1endpoints
RESTarchitecture
1key for all APIs
  • Fully typed responses — auto-completion in your IDE
  • Tracks the API in lockstep — new endpoints land same day
  • One key works across 125+ APIs on the platform
import axios from 'axios';

const { data } = await axios.get(
  'https://html-render.dataandapis.com/v1/v1/convert',
  { headers: { 'X-Api-Key': process.env.API_KEY } }
);

HTML Render · X-Api-Key

Explore the endpoints

Browse request parameters and inspect live example responses.

Available Endpoints

Request Parameters

API URL

Headers

X-Api-Key
Content-Type

Request Body

application/json
html: "<html><body><h1>Invoice #2025-001</h1><table><tr><th>Description</th><th>Qty</th><th>Total</th></tr><tr><td>HTML to PDF Conversion</td><td>10</td><td>$0.50</td></tr><tr><td>HTML to PNG Rendering</td><td>8</td><td>$0.32</td></tr><tr><td>Custom Branding</td><td>1</td><td>$4.99</td></tr></table><p>Total Due: $5.81</p></body></html>"
format: "pdf"
import axios from 'axios';

const url = 'https://html-render.dataandapis.com/v1/v1/convert';
const body = {
  "html": "<html><body><h1>Invoice #2025-001</h1><table><tr><th>Description</th><th>Qty</th><th>Total</th></tr><tr><td>HTML to PDF Conversion</td><td>10</td><td>$0.50</td></tr><tr><td>HTML to PNG Rendering</td><td>8</td><td>$0.32</td></tr><tr><td>Custom Branding</td><td>1</td><td>$4.99</td></tr></table><p>Total Due: $5.81</p></body></html>",
  "format": "pdf",
  "options": {
    "format": "A4",
    "printBackground": true,
    "margin": {
      "top": "20px",
      "right": "20px",
      "bottom": "20px",
      "left": "20px"
    }
  }
};

const { data } = await axios.post(url, body, {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
});

One subscription. Every API.

Tokens unlock this API and 125+ others on DataAndAPIs. Switch APIs any time — we promote.

FREE

$0/mo

500 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Community support
Start free
Most Popular

STARTER

$6.99/mo

25,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Email support
Subscribe

PRO

$24.99/mo

100,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority email support
Subscribe

ULTRA

$99.99/mo

1,000,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority support
Subscribe

Need higher volume, dedicated infra, or a custom contract? Talk to sales →

Questions about HTML Render

Ship HTML Render this afternoon.

500 free tokens. No card. Plus 125+ other APIs on the same key.