HTML to image API

Convert raw HTML and CSS into a pixel-perfect PNG, JPEG or PDF with one API call — render on hosted Chromium, no headless browser to run yourself.

PNG · JPEG · PDF Real Chromium render Same /v1/capture endpoint
html → image · cURL
curl "https://screenshotink.com/v1/capture" \
  -H "Authorization: Bearer sk_live_…" \
  --data-urlencode html="<h1>Hello</h1>" \
  -d format=png
200 · rendereddone
{ "image_url": "…/a3f9c2.png" }
What you can render

Turn a template into an image, on demand

Send the HTML you already have — inline styles, web fonts, flexbox, grid, SVG — and get back a rendered image. No layout surprises: it's real Chromium, the same engine your users run.

OG & social images

Render a 1200×630 card per post from an HTML template — title, author, avatar baked in at request time.

Receipts & email images

Convert an invoice or receipt template into a PNG or PDF for attachments, exports and order confirmations.

Certificates & badges

Generate a personalised certificate or completion badge from a styled HTML template, named and dated per user.

Charts & report images

Render an SVG or canvas chart wrapped in HTML into a flat image for dashboards, digests and PDF reports.

Multiple language examples

POST your HTML, get an image back

Put the raw markup in the html parameter and pick a format. Same request shape in every language.

curl "https://screenshotink.com/v1/capture" \
  -H "Authorization: Bearer sk_live_…" \
  --data-urlencode html="<h1 style='font:48px sans-serif'>Hello</h1>" \
  -d width=1200 -d height=630 -d format=png

Generating link previews from a layout? See generating Open Graph images. Every parameter — sizing, format, quality, full-page — is listed in the request parameters reference.

Prefer a URL?

Try a live capture

The same engine captures a live URL too — drop one in and watch it render, stamped and ready.

Or screenshot a URL

Live

Your capture renders here — stamped and ready.

From the tool to the API

One endpoint for HTML and URLs

HTML-to-image isn't a separate product — it's the same /v1/capture endpoint you'd use for a URL. Pass html instead of url and everything else — sizing, format, quality — works the same way.

Identical requests are cached for 24 hours, so re-rendering the same template is free. Start with a free key — 100 captures a month, no card — and plans begin at $9/mo when you need more.

html → pdf · cURL
curl "https://screenshotink.com/v1/capture" \
  -H "Authorization: Bearer sk_live_…" \
  --data-urlencode html="<article>…</article>" \
  -d format=pdf
200 · cached 24hdone
{ "image_url": "…/c71b08.pdf" }

HTML to image FAQ

POST your markup in the html parameter to /v1/capture and get back a PNG, JPEG or PDF rendered on real Chromium. No headless browser to run yourself.

Yes — inline or linked CSS, Google Fonts and @font-face all render. The page loads exactly as Chromium would render it.

Set an exact width and height (e.g. 1200×630 for an Open Graph image) or let it auto-size, and choose PNG, JPEG or PDF.

A free API key includes 100 captures a month with no card. Paid plans start at $9/mo for 2,000 captures.