ahmedaldakheel/html2pic 🔢✓📝❓ → 🖼️
About
A simple, fast API that converts any HTML/CSS string into a high-quality PNG or JPEG image with customizable dimensions.
Example Output
Output
Performance Metrics
0.97s
Prediction Time
0.97s
Total Time
All Input Parameters
{
"width": 1080,
"height": 1350,
"quality": 90,
"full_page": false,
"html_content": "\n<style>\n body {\n margin: 0;\n width: 1080px;\n height: 1350px;\n background-color: #ffffff;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n h1 {\n color: #00aeac;\n font-family: Arial, sans-serif;\n font-size: 120px;\n font-weight: bold;\n margin: 0;\n }\n</style>\n <h1>Welcome!</h1>\n",
"output_format": "png",
"device_scale_factor": 1
}
Input Parameters
- width
- Image width in pixels
- height
- Image height in pixels
- quality
- Image quality (for JPEG only, 1-100)
- full_page
- Capture full page (ignores height parameter)
- html_content
- HTML content to convert to image
- output_format
- Output file format
- device_scale_factor
- Device scale factor for high-DPI displays
Output Schema
Output
Version Details
- Version ID
129ade64a7a404ee299b244081629d3cecd4d164cab1559beeca49d4f553ed01- Version Created
- October 8, 2025