HTML-to-image for sales

Create personalized sales images from CRM data

Turn account, prospect, and opportunity data into consistent visual briefs, proposal graphics, and outreach images without manual design work.

  • CRM-driven images
  • Personalized outreach
  • Consistent sales collateral
Real API requests followed by their generated images.
POST https://hcti.io/v1/image
html
<div class="p-4 background d-block text-center" style="width: 500px">
  <span class="tweet-text mb-4">
    This is Little Bear. He tolerates baths because he knows how phenomenal his
    floof will appear afterwards. 13/10
  </span>
  <div class="mt-2 p-4">
    <img src="https://docs.htmlcsstoimage.com/assets/images/dog.jpg" class="rounded-circle shadow border mt-4" width="100px">
  </div>
  <h4 class="mt-2">
    WeRateDogs
  </h4>
  <span>@dog_rates</span>
</div>

<!-- Include external CSS, JavaScript or Fonts! -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">

<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@700" rel="stylesheet">
css
.tweet-text {
  background-color: #fff2ac;
  background-image: linear-gradient(to right, #ffe359 0%, #fff2ac 100%);
  font-weight: bolder;
  font-size: 32px;
  font-family: 'Roboto', sans-serif;
  padding: 4px;
}

.background {
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 800 800'%3E%3Cdefs%3E%3CradialGradient id='a' cx='400' cy='400' r='50%25' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='1' stop-color='%230EF'/%3E%3C/radialGradient%3E%3CradialGradient id='b' cx='400' cy='400' r='70%25' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='1' stop-color='%230FF'/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect fill='url(%23a)' width='800' height='800'/%3E%3Cg fill-opacity='.8'%3E%3Cpath fill='url(%23b)' d='M998.7 439.2c1.7-26.5 1.7-52.7 0.1-78.5L401 399.9c0 0 0-0.1 0-0.1l587.6-116.9c-5.1-25.9-11.9-51.2-20.3-75.8L400.9 399.7c0 0 0-0.1 0-0.1l537.3-265c-11.6-23.5-24.8-46.2-39.3-67.9L400.8 399.5c0 0 0-0.1-0.1-0.1l450.4-395c-17.3-19.7-35.8-38.2-55.5-55.5l-395 450.4c0 0-0.1 0-0.1-0.1L733.4-99c-21.7-14.5-44.4-27.6-68-39.3l-265 537.4c0 0-0.1 0-0.1 0l192.6-567.4c-24.6-8.3-49.9-15.1-75.8-20.2L400.2 399c0 0-0.1 0-0.1 0l39.2-597.7c-26.5-1.7-52.7-1.7-78.5-0.1L399.9 399c0 0-0.1 0-0.1 0L282.9-188.6c-25.9 5.1-51.2 11.9-75.8 20.3l192.6 567.4c0 0-0.1 0-0.1 0l-265-537.3c-23.5 11.6-46.2 24.8-67.9 39.3l332.8 498.1c0 0-0.1 0-0.1 0.1L4.4-51.1C-15.3-33.9-33.8-15.3-51.1 4.4l450.4 395c0 0 0 0.1-0.1 0.1L-99 66.6c-14.5 21.7-27.6 44.4-39.3 68l537.4 265c0 0 0 0.1 0 0.1l-567.4-192.6c-8.3 24.6-15.1 49.9-20.2 75.8L399 399.8c0 0 0 0.1 0 0.1l-597.7-39.2c-1.7 26.5-1.7 52.7-0.1 78.5L399 400.1c0 0 0 0.1 0 0.1l-587.6 116.9c5.1 25.9 11.9 51.2 20.3 75.8l567.4-192.6c0 0 0 0.1 0 0.1l-537.3 265c11.6 23.5 24.8 46.2 39.3 67.9l498.1-332.8c0 0 0 0.1 0.1 0.1l-450.4 395c17.3 19.7 35.8 38.2 55.5 55.5l395-450.4c0 0 0.1 0 0.1 0.1L66.6 899c21.7 14.5 44.4 27.6 68 39.3l265-537.4c0 0 0.1 0 0.1 0L207.1 968.3c24.6 8.3 49.9 15.1 75.8 20.2L399.8 401c0 0 0.1 0 0.1 0l-39.2 597.7c26.5 1.7 52.7 1.7 78.5 0.1L400.1 401c0 0 0.1 0 0.1 0l116.9 587.6c25.9-5.1 51.2-11.9 75.8-20.3L400.3 400.9c0 0 0.1 0 0.1 0l265 537.3c23.5-11.6 46.2-24.8 67.9-39.3L400.5 400.8c0 0 0.1 0 0.1-0.1l395 450.4c19.7-17.3 38.2-35.8 55.5-55.5l-450.4-395c0 0 0-0.1 0.1-0.1L899 733.4c14.5-21.7 27.6-44.4 39.3-68l-537.4-265c0 0 0-0.1 0-0.1l567.4 192.6c8.3-24.6 15.1-49.9 20.2-75.8L401 400.2c0 0 0-0.1 0-0.1L998.7 439.2z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
}
google fonts
Roboto

Live demo

Turn HTML and CSS into an image

Edit the HTML and CSS, choose the image settings, and render the result with the same API used in production.

Loading playground…

Add it to your app

Use the API from your application

Send HTML and CSS from your server. The API renders it in Chromium and returns an image URL you can use in your application, emails, or social posts.

Replace the API credentials in the example with your own. The language tabs include both direct HTTP requests and official clients with typed requests and responses.

Start with 50 free images each month. See plans and pricing or the API reference.

What the API returns
{
  "url": "https://hcti.io/v1/image/01a209b1-03d8-7455-9aea-a32bb48b8e4f.png",
  "id": "01a209b1-03d8-7455-9aea-a32bb48b8e4f"
}

Each request returns its own image ID and URL. Embed the URL directly or download the file.

import { HtmlCssToImageClient, CreateHtmlCssImageRequest } from "@html-css-to-image/client";

const client = HtmlCssToImageClient.fromEnv();

const request = new CreateHtmlCssImageRequest({
    html: `<div class="card">
  <h1>Hello, world!</h1>
  <p>Generated from HTML and CSS.</p>
</div>`,
    css: `.card {
  width: 480px;
  padding: 40px;
  background: #f0fdf4;
  color: #052e16;
  font-family: sans-serif;
}`,
    format: "png",
});

const result = await client.createImage(request);
if (result.success) {
    console.log(result.url);
} else {
    console.error(result.error);
}

Rendering examples

Choose what goes into your image

Capture a single component, use your brand's font, or export a PNG with a transparent background. These are actual API renders.

Cropped weekly report card showing 1,284 orders

Capture one element

Export a card, chart, or receipt without the rest of the page. This request selects .report-card and leaves the header and footer out of the image.

"selector": ".report-card"
Docs
Announcement card rendered in Roboto with the headline Make it yours

Use your own fonts

This card uses Roboto at weight 700, loaded by name. For a custom font, link to your own stylesheet with an @font-face rule.

"google_fonts": "Roboto:700"
Docs
Green PAID badge with a transparent background

Generate a transparent PNG

Place a badge over a website, slide, or product photo without a white rectangle around it. The checkerboard shows the transparent part of this PNG.

"transparent_background": true
Docs

Image sizing

The right size for every screen

Set the layout, choose the pixel density, and capture exactly the area you need.

  • Set an exact browser viewport

    Choose the width and height in CSS pixels to render desktop, mobile, or custom responsive layouts.

  • Keep text sharp on Retina displays

    Increase pixel density to 2× or 3× for more output pixels without changing the layout's CSS dimensions.

  • Capture a component or the whole page

    Crop to an element with a CSS selector, or capture the full scrollable page when rendering a URL.

Explore image sizing
device_scale: 1 320 × 200 px
Monthly revenue card rendered at 1× pixel density

Enlarged detail

device_scale: 2 640 × 400 px
Monthly revenue card rendered at 2× pixel density

Enlarged detail

Both images use the same HTML, CSS, and 320 × 200 viewport. Only device_scale changes. The close-ups are enlarged equally to show the difference in text edges.

Rendering controls

Make the render your own

Control how the page looks and when it's captured, without maintaining your own browser automation.

  • Choose the browser environment

    Request light or dark mode, set the timezone, and choose screen or print media to match the result you need.

  • Use your own CSS and JavaScript

    Style your HTML or inject CSS into a webpage to hide unwanted elements. Include JavaScript in your HTML for charts and dynamic content.

  • Capture when the content is ready

    Add a delay or wait for your page to call ScreenshotReady(), so charts and application data are ready before capture.

Explore rendering options
The same page rendered in light and dark mode with custom styling.

Use cases

Generate useful visuals for every account

Read the docs

Account summaries

Render key company, contact, opportunity, and activity data into a visual brief for representatives.

Personalized outreach

Generate prospect-specific images using CRM fields, campaign copy, and approved branding.

Proposal graphics

Create pricing, package, timeline, and comparison visuals from current opportunity data.

Pipeline updates

Turn stage, value, progress, and next-step data into images for reports and team communication.

Ready to render?

Create your first image from HTML and CSS

Send HTML and CSS to the API and receive a hosted image URL without running browser infrastructure.

Official API clients

Turn your HTML into images—in your language

Send HTML, CSS, and render options from your application using one of our official API clients.

Choose your language for setup instructions and examples. Keep API credentials in your server-side code.

We take pride in creating native clients and integrations—not relying on code generation. All our clients are open source, and contributions are welcome.