# HTML to JPG converter

> A free online tool that converts pasted HTML and CSS into a JPG (JPEG) image at the width, height, pixel density and quality you choose, drawn by headless Chromium.

Use this HTML to JPG converter to turn HTML and CSS into a JPEG image. Paste your markup, set the width, height and quality, and download the file. The tool is free and needs no signup; anonymous use asks for a human check first. Chromium draws the page on our servers, so you see what a browser draws.

## Key facts

- Input: HTML and CSS pasted into the editor, up to 256 KB; width 100 to 4000 px, height up to 2000 px in the free tool, pixel density 1x, 2x or 3x.
- Output: a JPG (JPEG) with a quality setting from 1 to 100, default 80; JPEG has no transparency, so areas the page does not paint are white.
- In our test a flat card was about the same size as PNG at quality 80 (41 KB as JPG and 42 KB as PNG), while a 1200 x 630 px gradient banner was 27 KB as JPG at quality 80 and 493 KB as PNG.
- The API call is POST https://api.aiipworld.com/v1/render with output jpeg and options.quality; the PNG version of this tool is the HTML to PNG page.
- Free without an account: up to 10 conversions per minute and 50 per day per visitor, no watermark. Signed in, each render costs 1 credit (100 free credits every month).
- Files are deleted automatically: 10 minutes after conversion without an account, 1 day with a free account.
- Developers can run the same render with POST https://api.aiipworld.com/v1/render and an API key (see the screenshot API page).

## How it works

1. Paste your HTML and CSS into the editor. JPG is already selected when the page opens.
2. Set the width and height of the image area in pixels.
3. Choose the pixel density: 1x, 2x or 3x.
4. Set the JPG quality from 1 to 100. The default is 80.
5. Press Create image and download the file.

## How to convert HTML to JPG

To convert HTML to JPG, paste your HTML and CSS into the editor above. JPG is already selected when this page opens. Set the width and height of the image area, then press Create image and download the file. The tool draws the page in headless Chromium and saves the result as a JPEG.

The steps are short, but the size settings matter most. The image you get is the area you set, multiplied by the pixel density. If parts of your design are missing, make the area larger or check that your CSS fits inside it. Check the file at full size before you use it.

- Paste complete HTML, including any style block or link to a public stylesheet.
- Open the downloaded file at full size to confirm the layout.

## What the HTML to JPG converter does

The converter takes the HTML and CSS you paste and draws them with headless Chromium on our render servers. Each conversion runs in a fresh browser context inside a resource-limited container with a hard time limit. The result is saved as a JPEG file for you to download.

This is the same engine used by the HTML to PNG page, so layout and fonts match between the two. Only the output format differs. The tool works on pasted markup, not on a live site. JavaScript runs by default, and images and stylesheets load only from public http or https addresses.

- Pasted HTML and CSS: supported.
- A live website by its address: use the website screenshot tool instead.

## JPG quality and file size

JPG quality sets how much detail the encoder keeps. The range is 1 to 100, and the default is 80. Lower values make smaller files with more visible damage. Higher values keep more detail and produce larger files. To change the HTML to JPG file size, adjust the quality setting before each conversion.

We measured one flat test card, a 640 x 340 px area at 2x (1280 x 680 px), with flat colours and text. Its file size was 23.5 KB at quality 30, 29.0 KB at 50, 41.0 KB at 80, 65.2 KB at 95 and 88.8 KB at 100. Your numbers will differ with your design, so test two or three settings on your own HTML.

- Quality 80 is the default and a reasonable starting point for most designs.
- Quality 95 or higher gives larger files when detail matters more than size.

## JPG or PNG: which to choose

The right format depends on the image. JPEG is lossy and has no alpha channel, so it is often a good fallback for photographs. PNG is lossless and supports full transparency. MDN's image format guide notes that lossy compression can give unsatisfactory results on content that needs sharpness, such as diagrams or charts.

Our two test cases show the difference. A flat card at 2x was 41.6 KB as PNG and 41.0 KB as JPEG at quality 80, so the sizes were about the same. A 1200 x 630 px banner made of soft gradients was 493 KB as PNG, but 26.8 KB as JPEG at quality 80 and 14.3 KB at quality 50. Gradients gave the largest saving in our tests.

Convert the same HTML both ways and compare the files. If your image needs transparent edges or sharp lines, use the HTML to PNG page instead. Our measurements came from our local test engine on 2026-10-11, so treat them as examples, not a rule.

## JPG and backgrounds

JPEG has no transparency. Where your page paints no background, the JPG shows white. Rounded corners and transparent edges also turn white in a JPG.

To use another colour, set a background on the html or body element in your CSS, for example background: #f5f1e8. Apply the colour to an element that covers the whole image so the full area is filled. If your image must keep see-through edges, use PNG instead.

- Set the background on html or body to fill the whole image.
- Use PNG when you need transparency.

## Image size and pixel density

The image size in pixels is the width multiplied by the height, multiplied by the pixel density. A 640 x 340 px area at 2x gives 1280 x 680 px. Density can be 1x, 2x or 3x. A higher density draws more pixels for the same area, which makes the file larger.

The free tool accepts widths from 100 to 4000 px and heights from 100 to 2000 px. Set the area to the size you need for the final use, such as a social card or an email header. Changing the density does not change the layout, only the number of pixels drawn.

- Set the area to the exact size you will publish.
- Use 2x when you want more pixels for text and fine detail.

## HTML to JPEG online: social cards, banners and email images

People use this page to make social cards, web banners and images for email. Gradient backgrounds and photo-like banners compress well as JPEG, as the measurements above show. If you were looking for an HTML to JPEG converter, this is one. To convert HTML to JPEG, use the same form, because only the API value is spelled jpeg. Sharp text and diagrams may need a higher quality setting or PNG.

The tool does not know the rules of any platform. It draws what your HTML draws and gives you a JPEG at the size you set. Check the dimensions and file size against what the site or email client requires before you upload. You do not install anything to use this HTML to JPG online tool.

- Social card: large headline on a gradient background.
- Banner: set the exact pixel size you need.
- Email image: lower the quality to reduce file size, then check the result in your email.

## Fonts, images and scripts in your HTML

Fonts on your own computer are not on the render server. The server has the Liberation, Noto Sans and Noto Serif families, Noto Sans CJK for Chinese, Japanese and Korean, and Noto Color Emoji. Our tests on 2026-10-11 confirmed that CJK text and emoji draw correctly. For other fonts, load them with @font-face from a public URL or a data URL.

Images and stylesheets load only from public http or https addresses. Private networks, localhost and cloud metadata addresses are blocked. JavaScript runs by default, so a script that changes the page will change the result. If an image fails to load, the JPG shows the gap, so check the file before you use it.

- Use a public https address for each image.
- Use @font-face with a data URL for a custom font.

## Size and file limits

The free web tool accepts up to 256 KB of HTML per conversion. The height of the image area can be at most 2000 px. Each visitor can run 10 conversions per minute and 50 per day. These limits apply to the free web tool. The API has its own plan limits.

Anonymous use needs a human check (Cloudflare Turnstile). Signed-in users skip the check and pay 1 credit per simple render. Free accounts get 100 free credits every month. The output has no watermark. If your HTML is over the limit, remove unused CSS or move large images to a public address.

- Limit: 256 KB of HTML per conversion in the free web tool.
- Limit: 2000 px maximum height in the free web tool.

## HTML to JPG from code

You can run the same conversion from your own code with the API. Send a POST request to https://api.aiipworld.com/v1/render with your HTML, output set to "jpeg", and options.quality from 1 to 100 (default 80). Authenticate with your API key in an Authorization: Bearer header. Ready cURL, Node and Python examples appear below the tool.

The API returns 202 with a job_id. Poll GET /v1/jobs/:id until the status is succeeded, failed or timeout, then download the file from download_url. That link is short-lived, so save the file when you receive it. Failed and timed-out jobs are refunded. Unknown option names are rejected, so check the spelling of each one. The API docs are at /docs/ and the screenshot API page is at /screenshot-api/.

- Other options include viewport width and height, device_scale_factor from 1 to 3, full_page and clip.
- Output is set with output "jpeg". WebP is not supported by the HTML tools.

## Privacy: what happens to your file

Your HTML is sent to our render server so it can be drawn. Results from the free web tool are deleted after 10 minutes. No history of your conversions is kept. The rendered page passes through our servers during the conversion, so paste only content you are allowed to share.

The Acceptable Use Policy applies to this tool. Use it for real files and real pages only.

- Do not paste secrets such as API keys into your HTML.
- Save the JPG you need, because it is deleted after the retention period.

## Questions

### How do I convert HTML to JPG?

Paste your HTML and CSS into the editor, set the width and height of the image area, keep JPG selected, and press Create image and download the file. You can also set the pixel density and JPG quality before you convert.

### Is HTML to JPEG the same as HTML to JPG?

Yes. JPG and JPEG are two names for the same format. The format list in the tool shows JPG (JPEG), and the API uses the value jpeg.

### Why is my JPG background white?

JPEG has no transparency, so any area the page does not paint shows white. Set a background colour on the html or body element in your CSS to change it.

### What JPG quality should I use?

Start with the default of 80. Raise the value if you see blocky marks around text or edges, and lower it if the file must be smaller. Compare a few settings on your own HTML before you choose.

### Is a JPG smaller than a PNG?

Not always. In our flat card test, the JPEG at quality 80 was about the same size as the PNG. In our gradient banner test, the JPEG was far smaller, so the result depends on the design.

### Can I convert an HTML document to JPG?

Yes, if the document is HTML and CSS you can paste. Open the .html file in a text editor, copy the contents, and paste them into the editor. The tool takes pasted code, not a file upload.

### Can I turn a live web page into a JPG with this tool?

No. This tool renders the HTML you paste, not a page at an address. To capture a live page by its address, use the website screenshot tool, which can output JPEG.

### Why does the text look soft or blocky?

JPEG is lossy, and a low quality setting creates blocky marks around text and sharp edges. Raise the JPG quality to reduce them, which also increases the file size. If the text must stay sharp, use the HTML to PNG page.

### Can I get a JPG of just one element?

Not in the free web tool, which renders the HTML you paste. Paste only the element and the CSS it needs. In the API, the screenshot options include clip with x, y, width and height, so you can capture a region.

### How big can the JPG be?

The free tool accepts widths from 100 to 4000 px and heights up to 2000 px. The final size is width times height times pixel density, so a higher density makes the image larger. API full-page captures are capped at 16,384 px tall.

### Is HTML to JPG free?

Yes, the free web tool needs no account. Anonymous use asks for a human check. Signed-in users skip the check, receive 100 free credits every month, and pay 1 credit per simple render.

### Can I convert HTML to JPG in code?

Yes. Send a POST request to /v1/render with output set to "jpeg" and an options.quality value, then poll the job until it finishes and download the file. Ready cURL, Node and Python examples appear below the tool.

## Related

- [HTML to PNG converter](https://aiipworld.com/tools/html-to-image/index.md)
- [Website screenshot tool](https://aiipworld.com/tools/website-screenshot/index.md)
- [Full page screenshot](https://aiipworld.com/tools/full-page-screenshot/index.md)
- [OG image](https://aiipworld.com/tools/og-image-generator/index.md)
- [Code to image](https://aiipworld.com/tools/code-to-image/index.md)
- [Text to PNG](https://aiipworld.com/tools/text-to-png/index.md)
- [PNG to WebP Converter](https://aiipworld.com/tools/png-to-webp/index.md)
- [Screenshot API](https://aiipworld.com/screenshot-api/index.md)
- [WebP to PNG: Convert Your Image Online](https://aiipworld.com/tools/webp-to-png/index.md)

Page: https://aiipworld.com/tools/html-to-jpg/
