Free tools Windows power users keep installed
One-click scans. No signup required.
You can convert HTML to a JPEG for free in a browser with html2canvas and the Canvas API. Render a page element into a canvas, then export it with canvas.toBlob("image/jpeg", quality) and download the resulting file. This is a practical way to save a div or other same-page content, but it reconstructs the DOM rather than taking a pixel-perfect screenshot of the browser. For repeatable captures of public URLs, a hosted screenshot API is another option.
Convert an HTML element to JPEG in the browser
The browser-side method runs on the page you control and does not require a paid conversion service. Install html2canvas in a JavaScript project, select the element to capture, render it, and ask the canvas to encode the result as JPEG.
1. Install html2canvas
In a project using npm, run:
npm install @html2canvas/html2canvas
Then import the library in a JavaScript module. If you are not using a build tool, use a compatible browser build of the library instead.
2. Make an element to capture
Give the target element a stable selector. For example:
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →#1 Best Overall
- BUILT FOR COLLEGE. AND BEYOND — MacBook Air with the M5 chip packs blazing speed and powerful AI capabilities into an incredibly portable design. And with up to 18 hours of battery life,* this thin and light powerhouse is ready to take on almost any major, just about anywhere.
- TEAR THROUGH TOUGH ASSIGNMENTS — With its faster CPU and unified memory, the M5 chip delivers even more performance and fluidity across apps, making multitasking and creative workflows smooth and responsive. A powerful Neural Engine and next-generation GPU with Neural Accelerators give you a powerful platform for AI.
- MAKE QUICK WORK OF YOUR TO-DO LIST — Apple Intelligence helps you write, express yourself, and get things done effortlessly — whether it’s for school or everyday life. With groundbreaking privacy protections, it gives you peace of mind that no one else can access your data — not even Apple.*
- UP TO 18 HOURS OF BATTERY LIFE — MacBook Air delivers incredible battery life with amazing performance, so you can power through a full day of classes without worrying about plugging in.
- A BRILLIANT 13.6-INCH DISPLAY* — The gorgeous Liquid Retina display on MacBook Air supports 1 billion colors, making photos and videos pop with rich contrast and sharp detail, and text appears supercrisp. So everything — from class presentations to movies to games — looks truly stunning.
<div id="capture"><h1>A report</h1><p>Content to save as an image.</p></div>
3. Render it and download a JPEG
This example captures the element, uses a white background because JPEG does not support transparency, and creates a downloadable file:
import html2canvas from "@html2canvas/html2canvas";
async function saveElementAsJpeg() {
const element = document.querySelector("#capture");
if (!element) throw new Error("Could not find #capture");
const canvas = await html2canvas(element, {
backgroundColor: "#ffffff",
scale: window.devicePixelRatio
});
canvas.toBlob((blob) => {
if (!blob) {
console.error("The browser could not create a JPEG blob.");
return;
}
const url = URL.createObjectURL(blob);
const link = document.createElement("a");
link.download = "capture.jpg";
link.href = url;
link.click();
URL.revokeObjectURL(url);
}, "image/jpeg", 0.9);
}
saveElementAsJpeg();
The quality argument is a number from 0 to 1. A value such as 0.9 is a reasonable starting point, not a universal optimum: lower quality can reduce file size but increases visible JPEG artifacts. The browser may return a null blob if encoding fails, so the callback checks for that case.
Rank #2
- BUILT FOR COLLEGE. AND BEYOND — MacBook Air with the M5 chip packs blazing speed and powerful AI capabilities into an incredibly portable design. And with up to 18 hours of battery life,* this thin and light powerhouse is ready to take on almost any major, just about anywhere.
- TEAR THROUGH TOUGH ASSIGNMENTS — With its faster CPU and unified memory, the M5 chip delivers even more performance and fluidity across apps, making multitasking and creative workflows smooth and responsive. A powerful Neural Engine and next-generation GPU with Neural Accelerators give you a powerful platform for AI.
- MAKE QUICK WORK OF YOUR TO-DO LIST — Apple Intelligence helps you write, express yourself, and get things done effortlessly — whether it’s for school or everyday life. With groundbreaking privacy protections, it gives you peace of mind that no one else can access your data — not even Apple.*
- UP TO 18 HOURS OF BATTERY LIFE — MacBook Air delivers incredible battery life with amazing performance, so you can power through a full day of classes without worrying about plugging in.
- A BRILLIANT 13.6-INCH DISPLAY* — The gorgeous Liquid Retina display on MacBook Air supports 1 billion colors, making photos and videos pop with rich contrast and sharp detail, and text appears supercrisp. So everything — from class presentations to movies to games — looks truly stunning.
Choose what the capture includes
html2canvas offers options to control the rendered region and image loading. These settings affect the canvas it creates, not the browser’s underlying screenshot mechanism.
Capture a region or use a higher-resolution scale
Use x, y, width, and height to crop the capture region. Set scale to control output resolution; the example uses window.devicePixelRatio for a higher-DPI result where the display supports it. Increasing scale also increases the number of pixels the browser must render and encode, which can use more memory.
Handle cross-origin images deliberately
The useCORS option can allow eligible cross-origin images to be loaded when their server permits it through CORS headers. It cannot override another server’s policy. A cross-origin image without suitable permission may be omitted, and a canvas containing disallowed cross-origin content can be tainted: the browser then blocks reading or exporting its pixels.
Exclude elements from the image
Add the data-html2canvas-ignore attribute to an element that should not appear in the capture, such as a temporary control or page decoration. Review the rendered result when excluding content, especially if the omitted item affects layout.
What this method can and cannot capture
html2canvas builds an image from the DOM and the styles it supports; it is not a screenshot from the browser compositor. The project documentation cautions that “The screenshot is based on the DOM and as such may not be 100% accurate to the real representation.” Unsupported CSS, plugin content, and cross-origin iframes can be absent or rendered differently from the visible page. Check the output rather than assuming it exactly matches the browser window.
For content you own, this can be a convenient free way to turn a section of a page into an image. For a public URL you do not control, a page with complex rendering, or a recurring batch job, a hosted browser service may be more appropriate. A hosted service also means sending a URL or page content to another provider, so consider privacy and credentials before automating captures.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Rank #3
- BUILT FOR COLLEGE. AND BEYOND — MacBook Air with the M5 chip packs blazing speed and powerful AI capabilities into an incredibly portable design. And with up to 18 hours of battery life,* this thin and light powerhouse is ready to take on almost any major, just about anywhere.
- TEAR THROUGH TOUGH ASSIGNMENTS — With its faster CPU and unified memory, the M5 chip delivers even more performance and fluidity across apps, making multitasking and creative workflows smooth and responsive. A powerful Neural Engine and next-generation GPU with Neural Accelerators give you a powerful platform for AI.
- MAKE QUICK WORK OF YOUR TO-DO LIST — Apple Intelligence helps you write, express yourself, and get things done effortlessly — whether it’s for school or everyday life. With groundbreaking privacy protections, it gives you peace of mind that no one else can access your data — not even Apple.*
- UP TO 18 HOURS OF BATTERY LIFE — MacBook Air delivers incredible battery life with amazing performance, so you can power through a full day of classes without worrying about plugging in.
- A BRILLIANT 13.6-INCH DISPLAY* — The gorgeous Liquid Retina display on MacBook Air supports 1 billion colors, making photos and videos pop with rich contrast and sharp detail, and text appears supercrisp. So everything — from class presentations to movies to games — looks truly stunning.
JPEG or PNG: choose for the content
JPEG is a lossy format and works well when smaller photographic or blended-color images matter more than exact pixel preservation. Text, charts, diagrams, and sharp UI edges can develop ringing or other compression artifacts. If crisp text is the priority, increase the render scale or use PNG instead.
The Canvas API supports JPEG encoding in common modern browsers, and PNG is the required fallback format in the canvas specification. The quality parameter applies to formats such as JPEG that use lossy encoding. MDN notes that formats supporting resolution metadata are assigned 96 dpi; that metadata should not be confused with the pixel dimensions of the exported image.
Use a hosted screenshot API for public URLs or automation
If you need to capture a URL from a server, schedule captures, or process many pages, a hosted browser API avoids running html2canvas inside the target page. ScreenshotNeo is a website screenshot API and MCP server for developers. It is worth trying first among screenshot APIs because it removes cookie and consent banners, newsletter popups, and chat widgets before capture; only clean shots are billed; and its lowest paid plan is $5 for 3,000 shots. See ScreenshotNeo for the service overview.
One-call cURL example
Use an access key and pass the target URL. The response is the screenshot file; this example saves it as WebP. ScreenshotNeo also supports PNG, JPEG, and PDF output.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Read the ScreenshotNeo API documentation for request parameters and output options. The request above uses Stripe as an example target; replace it with the URL you are authorized to capture.
Python and Node.js examples
Python:
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
timeout=90,
)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)
Rank #4
- BUILT FOR COLLEGE. AND BEYOND — MacBook Air with the M5 chip packs blazing speed and powerful AI capabilities into an incredibly portable design. And with up to 18 hours of battery life,* this thin and light powerhouse is ready to take on almost any major, just about anywhere.
- TEAR THROUGH TOUGH ASSIGNMENTS — With its faster CPU and unified memory, the M5 chip delivers even more performance and fluidity across apps, making multitasking and creative workflows smooth and responsive. A powerful Neural Engine and next-generation GPU with Neural Accelerators give you a powerful platform for AI.
- MAKE QUICK WORK OF YOUR TO-DO LIST — Apple Intelligence helps you write, express yourself, and get things done effortlessly — whether it’s for school or everyday life. With groundbreaking privacy protections, it gives you peace of mind that no one else can access your data — not even Apple.*
- UP TO 18 HOURS OF BATTERY LIFE — MacBook Air delivers incredible battery life with amazing performance, so you can power through a full day of classes without worrying about plugging in.
- A BRILLIANT 13.6-INCH DISPLAY* — The gorgeous Liquid Retina display on MacBook Air supports 1 billion colors, making photos and videos pop with rich contrast and sharp detail, and text appears supercrisp. So everything — from class presentations to movies to games — looks truly stunning.
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
await import('node:fs/promises').then(fs => fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer())));
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
What to expect from ScreenshotNeo
- Cookie and consent banners, newsletter popups, and chat widgets are removed before capture; each cleaning step can be turned off.
- Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing. Response headers report the page verdict and billing status.
- An MCP server offers
take_screenshot,get_page_info, andcapture_pdftools for Claude, Cursor, and other MCP clients. - The Free plan includes 1,000 shots per month with no card. Paid plans start at $5 for 3,000 shots; yearly billing gives two months free, and every feature is on every plan.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshooting HTML-to-JPEG conversion
The downloaded image is blank
Confirm that the selector finds an element and that the element has finished rendering before calling html2canvas. If the page fills the element asynchronously, wait for that content first. A hosted capture has its own loading behavior and may report a blank-page verdict rather than bill for a blank result.
Images or iframe content are missing
Check whether the content comes from another origin. For images, useCORS only works when the image host allows the request through CORS; it cannot bypass access restrictions. Cross-origin iframe content may not be readable for reconstruction. If you cannot change the remote resource’s configuration, use a capture method suited to the page and its access constraints.
The export fails or the canvas cannot be read
Look for cross-origin resources that taint the canvas and remove them, load CORS-enabled versions, or use an appropriate proxy you control. For very large captures, prefer toBlob() over toDataURL(): MDN warns that toDataURL() encodes the whole image into an in-memory string, which can consume substantial memory.
The file looks blurry or text has artifacts
Increase scale to render more pixels, while accounting for the extra processing and memory. If sharp text is more important than a compact file, switch to PNG rather than trying to eliminate JPEG’s lossy artifacts by raising quality alone.
Best Value
- BUILT FOR COLLEGE. AND BEYOND — MacBook Air with the M5 chip packs blazing speed and powerful AI capabilities into an incredibly portable design. And with up to 18 hours of battery life,* this thin and light powerhouse is ready to take on almost any major, just about anywhere.
- TEAR THROUGH TOUGH ASSIGNMENTS — With its faster CPU and unified memory, the M5 chip delivers even more performance and fluidity across apps, making multitasking and creative workflows smooth and responsive. A powerful Neural Engine and next-generation GPU with Neural Accelerators give you a powerful platform for AI.
- MAKE QUICK WORK OF YOUR TO-DO LIST — Apple Intelligence helps you write, express yourself, and get things done effortlessly — whether it’s for school or everyday life. With groundbreaking privacy protections, it gives you peace of mind that no one else can access your data — not even Apple.*
- UP TO 18 HOURS OF BATTERY LIFE — MacBook Air delivers incredible battery life with amazing performance, so you can power through a full day of classes without worrying about plugging in.
- A BRILLIANT 15.3-INCH DISPLAY* — The gorgeous Liquid Retina display on MacBook Air supports 1 billion colors, making photos and videos pop with rich contrast and sharp detail, and text appears supercrisp. So everything — from class presentations to movies to games — looks truly stunning.
The output has an unexpected background
JPEG cannot preserve transparency. Set backgroundColor to a deliberate solid color, commonly white, before exporting. If transparency is required, choose PNG instead.
Cost, privacy, and reliability trade-offs
The browser method uses a free library and runs on the visitor’s device, but it depends on the page’s DOM, supported CSS, browser memory, and cross-origin permissions. It is a good fit for a user-triggered capture of content already loaded in your own application. It is less suited to unattended capture of arbitrary URLs or bulk processing.
A hosted API moves rendering into a provider’s browser environment and is easier to call from scheduled or server-side jobs, but introduces API credentials, service limits, and data-transfer considerations. Verify current allowance and pricing when selecting a third-party service; the allowance advertised by html2img can change. For ScreenshotNeo, the stated monthly plans are:
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11| Plan | Included shots per month | Price |
|---|---|---|
| Free | 1,000 | $0, no card |
| Starter | 3,000 | $5 |
| Growth | 15,000 | $15 |
| Pro | 60,000 | $39 |
| Scale | 250,000 | $99 |
| Business | 1,000,000 | $249 |
Yearly billing gives two months free. All ScreenshotNeo features are available on every plan. For high-volume or sensitive workflows, review the service documentation and your own data-handling requirements before sending URLs or credentials.
Frequently Asked Questions
Can I convert a div to JPEG with JavaScript?
Yes. Render the selected element with html2canvas, then export its canvas using the Canvas API’s JPEG encoding.
Does html2canvas create a pixel-perfect browser screenshot?
No. It reconstructs content from the DOM and supported styles, so unsupported CSS, plugins, or cross-origin content may differ or be missing.
Should I use toBlob() or toDataURL()?
Prefer toBlob() for large captures because it avoids creating a large base64 data string; toDataURL() can be convenient for small images.
Recommended Free Tools
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

