HTML & Tailwind → PNG / JPEG / WebP
The HTML to image API developers actually want
POST any HTML or Tailwind template and get back a pixel-perfect image in the same HTTP response — no headless browser to deploy, no puppeteer to patch, no infrastructure to keep alive.

POST /api/v1/render · type: "tailwind" · format: "png" · dimensions: "og-image"The full HTML rendering stack, without the ops burden
Full Tailwind utility support
Every flex, grid, color, and typography utility works — not a stripped-down subset. Design your template exactly as you would a real UI component.
PNG, JPEG, or WebP — any dimensions
Use named presets (og-image, square, story) for common sizes, or pass an exact width and height. WebP is typically 30–50% smaller than PNG with full alpha support. JPEG output gets a white background flatten automatically.
Synchronous — result in one request
No job ids, no webhooks, no polling loop. The image binary comes back in the same HTTP response that triggered the render.
How it works
- 1
Write your template in HTML or Tailwind
A card, a banner, a thumbnail — anything that renders in a browser is valid input. No special syntax to learn.
- 2
POST it to the render endpoint
Include your API key, the content, and the output dimensions. Get back a raw PNG, JPEG, or WebP binary.
curl -X POST https://renderfy.io/api/v1/render \ -H "Authorization: Bearer rfy_live_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "type": "tailwind", "content": "<div class=\"flex h-full items-center justify-center bg-zinc-900 text-white text-4xl font-bold\">Hello, world</div>", "options": { "format": "png", "dimensions": "og-image" } }' \ --output image.png - 3
Store, serve, or pipe it directly
Upload the binary to object storage, stream it directly to a browser response, or attach it to an email — the output is a standard image file.
Frequently asked questions
What's the difference between PNG, JPEG, and WebP output?+
PNG and WebP both support transparency — ideal for logos, badges, and overlays. WebP is typically 30–50% smaller than PNG at equivalent quality. JPEG is opaque (white background flatten applied automatically) and best for photos or banners where transparency isn't needed. All three are generated from the same HTML input.
Can I use custom fonts or brand colors?+
Yes. Tailwind utility classes give you full control over typography, color, spacing, and layout — the same classes you'd use in any frontend project.
Is there a size limit on the HTML I can send?+
The API accepts any HTML that renders within a standard viewport. For very large or complex layouts, use the PDF output instead, which handles multi-page content natively.
Can I call this from a serverless function or edge runtime?+
Yes. It's a plain HTTPS POST — callable from any runtime that can make an HTTP request, including Vercel Edge Functions, Cloudflare Workers, AWS Lambda, or a simple cron job.
More ways to use the API
Convert your first HTML template to an image today
Sign up, mint an API key, and render your first image in under 5 minutes — 100 free credits included, no card needed.