Features

Everything the HTML to Image API can do. Names, limits, and links to the docs.

⚙️

HTML and CSS rendering

Send raw markup and CSS to the HTML endpoint. We render it in real Chrome and return a PNG URL.

html parameter docs
📸

URL screenshots

Capture any public page with the Screenshot endpoint. Inject CSS to remove cookie banners or sticky headers before render.

url parameter docs

JavaScript support

Run JavaScript on the HTML endpoint up to a 30 second budget per render. Animations, third-party scripts and dynamic content all work.

JavaScript support
🔌

REST API

POST a JSON body, get a JSON response with a CDN URL for the PNG. Authenticate with a single header. Works from any language.

Getting started
🎨

Custom fonts

Google Fonts, Adobe Fonts and self-hosted @font-face all load server-side. Fonts resolve before paint, so glyphs never fall back to system defaults.

Loading fonts in HTML
🌍

Global CDN

Generated images are served from i.html2img.com on the same CDN that fronts this marketing site. Hot files cache at the edge.

Response format

Retina output

Render at 1x, 2x or 3x DPI. The 2x setting doubles memory and time, but produces files sized for retina displays without manual scaling.

dpi parameter docs
🎯

Selector capture

Pass a CSS selector to capture only the element you want from a URL screenshot. Useful for chart widgets, pricing tables and embeds.

selector parameter docs
📱

Viewport control

Set width and height between 1 and 5000 pixels. Render at desktop, tablet, mobile or any custom size. Default is 1440x900.

dimensions parameter docs
🎠

Modern CSS

Grid, flexbox, custom properties, transforms and animations all render exactly as Chrome does. No second compatibility model to learn.

css parameter docs
🔔

Webhook delivery

Skip the 30 second sync timeout for slow renders. We POST the finished URL to your webhook when the image is ready.

webhook_url parameter docs
🏗️

Wait for selector

Wait for a specific element to appear in the DOM before capture. Pairs with ms_delay for lazy-loaded widgets and iframes.

wait_for_selector parameter docs

Choose your endpoint

HTML and CSS

Best for: full design control. Send raw markup, run inline JavaScript, get back a PNG.

Limit: 30 second sync timeout per render.

html parameter docs

URL screenshot

Best for: capturing pages you already host. We load the URL in Chrome, render, return a PNG.

Limit: no JavaScript injection on the user side; the page runs its own scripts only.

url parameter docs

Named templates

Best for: skipping the design step. Send JSON, get a tested image. We host the design.

Limit: only the inputs the template defines.

Browse templates

Built for production

A few features matter most when you ship the API into a real product. Here are the three that come up first.

Webhook delivery

Hand off slow renders. POST a webhook_url and we deliver the finished PNG without holding your request open past the 30 second sync timeout.

webhook_url docs

DPI handling

Render at 1x, 2x or 3x for retina displays. 2x doubles memory and time, so use webhooks for high-DPI renders to avoid timeouts.

dpi docs

CDN delivery

Files land on i.html2img.com, the same CDN that fronts this marketing site. Hot files cache at the edge after the first request.

Response format

What renders

Custom fonts work three ways: Google Fonts loaded server-side, Adobe Fonts via the embed code you paste in your HTML, and self-hosted via an @font-face rule pointing at a public URL. Modern CSS works as it does in Chrome, including grid, flexbox, transforms, animations and custom properties. JavaScript executes on the HTML endpoint up to the 30 second render budget, but does not execute on the Screenshot endpoint, where the page runs its own scripts only. See the JavaScript support docs for the full breakdown.