---
canonical: 'https://htmlcsstoimage.com/features/html-to-image'
title: 'HTML to Image API - Convert HTML and CSS to Images | HTML/CSS to Image'
description: 'Convert HTML and CSS into PNG, JPEG, or WebP images with one API. Render web fonts, JavaScript, responsive layouts, and browser-supported CSS in headless Chromium.'
---

# Turn HTML and CSS into an image

Send HTML and CSS to the API and receive a hosted image URL. Build with the web tools you already know while HCTI manages Chromium, rendering, storage, and delivery.

## Key capabilities

- HTML, CSS, and JavaScript
- Viewport, timing, and browser controls
- Hosted image URL

## Generate an image from HTML and CSS

Send the HTML and CSS that define the image to `POST https://hcti.io/v1/image`. HTML/CSS to Image (HCTI) renders the content in headless Chromium and returns an image ID with a hosted URL.

```json
{
  "html": "<main class=\"card\"><h1>Weekly report</h1></main>",
  "css": ".card { padding: 48px; background: white; }"
}
```

Use browser-supported layout tools, web fonts, SVG, and JavaScript without maintaining your own screenshot browser. Set dimensions, device scale, output format, transparency, and other image options in the same request.

## MCP Integration

Connect an MCP-compatible client to `https://mcp.hcti.io` with OAuth. The tools use the connected organization's HTML/CSS to Image account, permissions, and plan limits.

- The `create_image` tool renders HTML and CSS as an image and returns the hosted image URL. Use it to create visual summaries, social cards, reports, and other application-generated graphics.

[Read the full MCP docs](https://docs.htmlcsstoimage.com/integrations/mcp/).

## Generate images directly from application data

### Open Graph and social images

Render page titles, authors, artwork, and metadata into images for social previews and publishing workflows.

### Product and account graphics

Turn current application data into product cards, summaries, badges, and personalized visuals.

### Reports and status cards

Convert metrics, tables, charts, and operational updates into images that are easy to share.

### Email and notification images

Generate visual content for messages, alerts, receipts, and automated customer communication.

## Get started

REST API requests require an HTML/CSS to Image account and should be authenticated from trusted application code. Check the API docs and pricing for current setup instructions, limits, and feature availability.

- [View the full feature page](https://htmlcsstoimage.com/features/html-to-image)
- [Browse all features](https://htmlcsstoimage.com/features.md)
- [Start free](https://htmlcsstoimage.com/join)
- [View pricing](https://htmlcsstoimage.com/pricing.md)
- [Read the docs](https://docs.htmlcsstoimage.com/getting-started/using-the-api/)
- [Read the MCP docs](https://docs.htmlcsstoimage.com/integrations/mcp/)
