HTML to Image API
Free Developer API
Convert HTML and CSS to stunning images with pixel-perfect rendering. Generate social media cards, thumbnails, and graphics programmatically. Modern Chromium engine with full CSS support.
100 requests/month free • No credit card required
How It Works
Send HTML/CSS
POST your HTML content with styling and image settings
Chromium Renders
Modern browser engine processes your content with perfect CSS support
Get High-Quality Image
Receive PNG, JPEG, or WebP format optimized for any platform
Key Features
Custom HTML Rendering
Render any HTML/CSS content including Tailwind, Bootstrap, custom fonts, and inline styles.
Flexible Dimensions
Set exact width and height in pixels for perfect social media images, thumbnails, and banners.
Multiple Formats
Output as PNG (transparent support), JPEG (smaller files), or WebP (modern, optimized).
CSS3 Support
Full CSS3 support including flexbox, grid, gradients, shadows, animations, and custom properties.
Web Fonts
Google Fonts and custom web fonts render perfectly via @import or link tags in your HTML.
Fast Generation
Sub-second rendering for most templates using our optimized Chromium pipeline.
Use Cases
Social Media Images
Generate dynamic OG images, Twitter cards, and Instagram posts from HTML templates at scale.
Email Templates
Preview and convert HTML email templates to images for testing across different clients.
Certificate Generation
Create personalized certificates, badges, and awards from dynamic HTML templates.
Report Thumbnails
Generate visual previews of dashboards, charts, and reports for embedding in notifications.
Pricing
Pro
- ✓ 10,000 API calls/month
- ✓ All 5 APIs included
- ✓ Priority support
- ✓ 99.9% SLA
Business
- ✓ 50,000 API calls/month
- ✓ Dedicated support
- ✓ Custom rate limits
- ✓ SLA guarantee
Quick Start
curl -s -X POST "https://api.toolcenter.dev/v1/html-to-image" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"html": "<div style=\"padding:20px;background:#3b82f6;color:white\"><h1>Hello World</h1></div>", "width": 800}'