html to image apiurl to image apiscreenshot apigenerate image from htmlwebpage screenshotsocial card generator

HTML to Image API

Render any HTML or URL as a pixel-perfect PNG or JPEG image.

Convert raw HTML strings or live URLs into high-quality images. Ideal for generating social media cards, email thumbnails, report previews, and automated screenshots. Supports configurable viewport dimensions, full-page capture and JPEG quality control.

POST/api/trpc/htmlToImage.convert
5 tokens / callAPI online

How it works

Three steps. No complex setup.

1

Send your request

Make a POST with the data you want to analyze. Include your API key in the Authorization header.

2

We process server-side

Our engine validates, analyzes and enriches the data in under 200ms. No external APIs, no network latency.

3

Receive the result

Typed JSON with all documented fields. Clear errors if something fails. Production ready.

Who is it for?

Marketing teams generating social media preview cards
SaaS platforms creating email thumbnails or report previews
Developers building automated screenshot pipelines
No-code tools that need HTML-to-image export

Response example

Real input and output. What you send and what you get back.

// Input

{
  "html": "<div style='background:#1a1a2e;color:#fff;padding:40px;font-family:sans-serif'><h1>Hello World</h1><p>Rendered as image.</p></div>",
  "width": 800,
  "height": 400,
  "format": "png"
}

// Output

{
  "success": true,
  "image_base64": "iVBORw0KGgoAAAANSUhEUgAAA...",
  "format": "png",
  "width": 800,
  "height": 400,
  "size_bytes": 18432,
  "generation_time_ms": 420,
  "cached": false
}

Try it now

// live demo — no account needed to try

Playground

Demo activa5 tokens

Integrate into your project

Copy and paste. Replace YOUR_API_KEY with your real key.

curl -X POST https://jsnhengine.com/api/v1/html-to-image \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html":"<h1 style=\"color:blue\">Hello</h1>","width":800,"height":400,"format":"png"}'

Why choose JSNH Engine Lab

Low latency

Responses in under 200ms

Secure authentication

API keys with per-plan rate limiting

Usage tracking

Every request logged with metrics

Production ready

Input validation and typed errors

Frequently asked questions

Everything you need to know before integrating.

Other modules

Expand your integration with more APIs from the catalogue.

Community reviews

What developers using this module say

Sign in to leave a review

No reviews yet. Be the first!

// production ready

Start using HTML to Image API

Sign up free and get 1,000 tokens to start. No credit card. No complex setup.