Skip to content
HTML/CSS to ImageDocs

Capture any public webpage as a high-quality image.

The HTML/CSS to Image API can capture screenshots of any publicly accessible URL. Pass a URL to the API, and get back a pixel-perfect screenshot rendered in a real instance of Google Chrome.

Terminal window
curl -X POST https://hcti.io/v1/image -u 'UserID:APIKey' \
--data-urlencode url="https://stripe.com"
Screenshot of stripe.com generated with the API

Capture and preserve webpage snapshots for compliance, legal, or historical purposes.

Generate preview images for links shared in your application, similar to how Slack or Twitter shows link previews.

Automatically capture competitor websites to track design changes over time.

Generate up-to-date screenshots for product documentation and tutorials.

Capture screenshots during automated testing to verify UI changes.

Use the selector parameter to capture just a portion of a page:

Terminal window
curl -X POST https://hcti.io/v1/image -u 'UserID:APIKey' \
--data-urlencode url="https://stripe.com" \
--data-urlencode selector="section#complete-toolkit"
Screenshot cropped to a CSS selector

Capture the entire scrollable length of a page:

Terminal window
curl -X POST https://hcti.io/v1/image -u 'UserID:APIKey' \
--data-urlencode url="https://example.com/long-page" \
--data full_screen=true

Learn more about full_screen

Many websites display consent popups. Use block_consent_banners to hide them:

Terminal window
curl -X POST https://hcti.io/v1/image -u 'UserID:APIKey' \
--data-urlencode url="https://example.com" \
--data block_consent_banners=true

Learn more about blocking cookie banners

Set device_scale to 2 for retina-quality images:

Terminal window
curl -X POST https://hcti.io/v1/image -u 'UserID:APIKey' \
--data-urlencode url="https://example.com" \
--data device_scale=2

Set a specific viewport size for your screenshots:

Terminal window
curl -X POST https://hcti.io/v1/image -u 'UserID:APIKey' \
--data-urlencode url="https://example.com" \
--data viewport_width=1920 \
--data viewport_height=1080

If the page needs time to fully render (e.g., charts, animations), add a delay:

Terminal window
curl -X POST https://hcti.io/v1/image -u 'UserID:APIKey' \
--data-urlencode url="https://example.com" \
--data ms_delay=1000

Modify the appearance of the page before capturing:

Terminal window
curl -X POST https://hcti.io/v1/image -u 'UserID:APIKey' \
--data-urlencode url="https://example.com" \
--data-urlencode css=".banner { display: none; } body { background: white; }"

We have dedicated guides for capturing content from popular platforms:

  • The hosted renderer must be able to reach the URL; local addresses such as localhost are not accessible.
  • For protected pages you control, use custom request headers or a configured proxy. An interactive login flow is not performed automatically.
  • Some sites may block automated access

Need help?

Talk to a human. Email support@htmlcsstoimage.com and we’ll help you get started.