Free tool · compact JPG
HTML to JPG
Paste HTML and CSS and download it as a JPG, the format every app and every upload form accepts. Rendered by a real browser, free, no sign-up.
Why JPG
JPG files are small and open everywhere: social networks, email clients, CMS upload forms and old software that knows nothing about WebP. For designs with photos, gradients or large backgrounds, a JPG is usually several times smaller than the same PNG.
| Size | Typical use |
|---|---|
| 1080 × 1080 | Instagram and LinkedIn posts |
| 1200 × 630 | Open Graph link previews |
| 1920 × 1080 | Slides, video thumbnails |
Quality and sharpness
The tool renders at quality 80. Text and thin lines lose a little sharpness in any JPG; Retina (2× pixels) makes up for most of it at a larger file size. If edges must stay perfect, use HTML to PNG.
HTML to JPG in your code
POST /v1/take with html, "format": "jpg" and an optional quality returns the JPG; see the Render HTML documentation. For all formats in one tool, see HTML to image.
Frequently asked questions
How do I convert HTML to JPG?
What JPG quality does the tool use?
Why does text look slightly soft in the JPG?
Is my HTML stored?
HTML to JPG API
Turn HTML templates into JPGs from your code
POST /v1/take with html and format=jpg renders your HTML in Chromium and returns the JPG, with the quality you choose (0-100), any size and pixel ratio.
/v1/take documentation HTML rendering API All documentation
300 free requests every month, and each JPG from HTML counts as one. No credit card required.
POST https://api.screenshotbase.com/v1/take
# Response: the JPG (image/jpeg)
curl -X POST "https://api.screenshotbase.com/v1/take" \
-H "apikey: YOUR-API-KEY" \
-H "Content-Type: application/json" \
-d '{"html": "<h1>Hello</h1>", "format": "jpg", "quality": 80, "viewport_width": 1080, "viewport_height": 1080}' \
-o post.jpg