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.

Add CSS (optional)

Rendered in a real browser (Chromium). Up to 1 MB of HTML; renders that need more than about 12 seconds are stopped. Images, fonts and styles must use absolute https:// URLs.

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.

SizeTypical use
1080 × 1080Instagram and LinkedIn posts
1200 × 630Open Graph link previews
1920 × 1080Slides, 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?

Paste your HTML, choose a size such as 1080 × 1080, keep the format on JPG and click Convert to image. Download the JPG when it appears.

What JPG quality does the tool use?

80 out of 100, Chrome's own default: a good balance of size and sharpness. With the API you can set quality from 0 to 100.

Why does text look slightly soft in the JPG?

JPG compression is made for photos and smooths hard edges a little. For text-heavy designs use PNG (see HTML to PNG), or tick Retina so the text has more pixels.

Is my HTML stored?

No. The JPG is sent straight back to your browser and kept only in this tab; the HTML is not stored or logged.

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

More free tools

Start using our Screenshot API for free today!

Get 300 requests / month for free