What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
To turn an HTML file into a JPG, render it in a browser or HTML-to-image tool, then save the rendered pixels as JPEG. For a direct command-line conversion, use wkhtmltoimage if your installed version supports JPG output. Chrome Headless’s documented screenshot command saves PNG, so you must convert that file to JPEG afterward.
HTML is markup, not an image format: the result depends on how the page is rendered, including the viewport, CSS, images, fonts, and scripts. Choose whether you need one screen-sized image or a full-page capture before converting.
Choose the right conversion method
The best route depends on what you have and how often you need the image:
- Local HTML file, direct JPG: use
wkhtmltoimagewith a JPG output format, after checking that your installed build supports it. - Browser-based rendering: Chrome Headless can capture the page as PNG. Convert that PNG to JPG in a separate image editor or conversion utility.
- Repeated PHP automation: Spatie Browsershot wraps Puppeteer and headless Chrome, accepts a local HTML file path, and can save an image or PDF depending on the output path.
- A webpage available at a URL: ScreenshotNeo can return an image from one GET request. It is for rendering a URL, not for granting a remote service access to an arbitrary file on your computer.
These tools may render the same HTML differently. In particular, wkhtmltoimage uses Qt WebKit, so verify pages that depend on newer browser features rather than assuming its output will match Chrome.
#1 Best Overall
- One-click Process for Converting Your Images
- Convert Between All Key Image Format
- Preserve Vector Graphics When Converting
Convert a local HTML file directly to JPG with wkhtmltoimage
wkhtmltoimage is a headless command-line HTML renderer. Its command-line reference describes input and output paths, a format option, screen width, and cropping controls. Check the help for the binary you installed: available options can vary by version.
Basic conversion
Open a terminal in the folder containing your file and run:
wkhtmltoimage --format jpg input.html output.jpg
Replace input.html with your file’s name and output.jpg with the destination path you want. If the command completes, check that the output file exists and open it to inspect the rendered page. If your version does not recognize --format or cannot write JPG, consult that version’s help and use the output-format syntax it supports.
Set the rendering width and crop
The selected screen width changes how responsive CSS lays out the page. A narrow width may trigger a mobile layout; a wider width may show more columns. The tool’s reference also documents screen-width and crop options. Consult the installed binary’s help for their exact syntax, then choose dimensions that match the layout you need. A crop captures only part of the rendered result; it is not the same as making a complete page image.
Rank #2
- ONGOING PROTECTION Download instantly & install protection for 5 PCs, Macs, iOS or Android devices in minutes!
- TOP-PERFORMING VPN Faster speeds, more server locations, and greater connection control to protect your privacy across all your devices, including Smart TVs.
- ADVANCED SCAM PROTECTION Help spot hidden scams online. With the built-in Genie AI assistant, you’ll never wonder if a message or email is suspicious again.
- REAL-TIME PROTECTION Advanced security protects against existing and emerging malware threats, including ransomware and viruses, and it won’t slow down your device performance.
- DARK WEB MONITORING Identity thieves can buy or sell your information on websites and forums. We search the dark web and notify you should your information be found.
Check access to local assets
If your HTML refers to a stylesheet, image, font, or script using a relative path, the renderer must be able to find and read that file. Keep the folder structure intact and run the command with the expected file paths. The Debian wkhtmltoimage(1) manual documents controls for local-file access, including an allow-path option. If a local resource is blocked, use the option documented by your installed version to allow the relevant directory; do not assume that permitting access to one file automatically permits every folder.
Use Chrome Headless, then convert its PNG to JPG
Chrome Headless’s documented --screenshot flag writes screenshot.png to the current working directory. The documented output is PNG, not JPG. Use Chrome when you want a browser-rendered screenshot, then open the PNG in an image editor or conversion utility and export it as JPEG.
Capture the local file
From a terminal, use Chrome’s executable path for your operating system. The following is the command pattern; replace the executable name or path if Chrome is not available as google-chrome on your system:
google-chrome --headless --screenshot --window-size=1440,1000 file:///absolute/path/to/input.html
Use an absolute file:/// URL for the local HTML file. The documented --window-size option sets the browser window dimensions; those dimensions affect the viewport and therefore what responsive content is visible. The command captures a viewport screenshot, not automatically a full-page image.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchRank #3
- Convert images to jpeg, gif, png, bmp, tiff and more
- Rotate, resize and compress digital photos
- Easily add captions or watermarks to your images
- Compress thousands of photos at a time with batch conversion
- Convert images directly from the right-click menu
Chrome processes page scripts before serializing the DOM, and its command-line reference documents timeout and virtual-time controls for capture timing. If a page fills in content after it loads, adjust the capture timing using the options supported by your Chrome version and inspect the result. A screenshot taken too early can miss content that appears later.
Export the PNG as JPEG
- Find
screenshot.pngin the terminal’s current working directory. - Open it in an image editor or conversion utility that can export JPEG.
- Choose JPEG/JPG as the output format, select a destination, and save.
- Open the new JPG and check that text, layout, and images are legible and complete.
JPEG uses lossy compression, so small text or sharp interface edges may look softer than in the PNG. If the output will be edited further or needs lossless detail, keep the PNG as well as the JPG.
Automate local HTML screenshots with Browsershot
Spatie Browsershot is a PHP wrapper around Puppeteer and headless Chrome. Its documentation describes using a local HTML file path as input and saving an image or PDF depending on the output path. This is useful when a PHP application needs to render files repeatedly, but it adds setup and browser dependencies compared with a one-off command.
Use the Browsershot documentation for the installation requirements and the version-specific code for setting a local file path and output destination. The available source establishes local-file input and image/PDF output, but does not establish a particular JPG configuration for every release. Confirm the output format supported by the Browsershot and Chrome versions in your application, or save PNG and convert it to JPG as a separate step.
Rank #4
- SONY IMAGE CONVERTER 2 SOFTWARE
Or skip the browser setup
If the HTML is already served at a URL that ScreenshotNeo can reach, one GET request can return an image. The example below follows ScreenshotNeo’s API pattern and saves the response body; see the ScreenshotNeo API documentation for available parameters and output formats.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
ScreenshotNeo can capture PNG, JPEG, or WebP. Before the capture, it can accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and the response identifies the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots a month without a card; paid plans start at $5 for 3,000 screenshots.
Sign up for ScreenshotNeo’s free plan to try 1,000 screenshots a month with no card.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.What affects the final JPG
Viewport versus full page
A screenshot shows the rendered page within the capture dimensions. Chrome’s documented --window-size option sets the viewport dimensions, while wkhtmltoimage documents screen-width and crop controls. If the page is taller than the viewport, a basic viewport screenshot may omit content below the fold. For a complete page, choose a renderer or capture option that supports full-page output; do not mistake a larger viewport for a guaranteed full-page capture.
Recommended Free Tools
CSS, fonts, images, and scripts
Check that linked stylesheets, images, and fonts are accessible to the renderer and that script-generated content has had time to appear. Local files may use relative paths that resolve differently depending on the working directory or file access rules. A browser may also render modern CSS differently from an older rendering engine. Review the image itself rather than assuming the source HTML guarantees a particular appearance.
Best Value
- Convert JPG, JPEG & PNG to PDF
- Select multiple images
JPEG quality and downstream use
JPG is appropriate when a system requires JPEG or when a compressed image is desired, but it does not preserve every pixel exactly. If sharp text, transparent areas, or later editing matter, retain a PNG or use a format suited to that purpose alongside the JPG. Check the destination’s file-type and dimension requirements before choosing the capture size.
Troubleshooting common problems
- The command is not found: the renderer may not be installed or its executable may not be on your PATH. Install or locate the tool using its project’s instructions, then check its version and help output.
- The output is PNG instead of JPG: Chrome’s documented screenshot flag writes PNG. Convert that file to JPEG separately, or use a wkhtmltoimage build that supports the requested JPG format.
- Images, CSS, or fonts are missing: confirm relative paths and local-file permissions. For wkhtmltoimage, check the installed manual’s local-file access controls and allow only the needed directory.
- The page is blank or incomplete: check that the input path or
file:///URL is correct, that the page loads its resources, and that scripts have time to populate content. Adjust capture timing with options supported by your Chrome version. - Content is cut off: determine whether you need a viewport image or a full-page capture. Change the viewport or dimensions, or choose a full-page-capable workflow rather than relying on a crop.
- The layout looks different from your browser: compare viewport dimensions and rendering engines. A Qt WebKit-based result should not be assumed to match a current Chrome rendering for pages using newer browser features.
- JPG looks fuzzy around text: JPEG compression can soften high-contrast edges. Re-capture at suitable dimensions and retain a PNG when lossless sharpness is important.
Which method should you use?
| Need | Practical choice | Important qualification |
|---|---|---|
| Direct command-line JPG from a local file | wkhtmltoimage |
Check your installed version’s format syntax and verify how it renders your page. |
| Screenshot through Chrome | Chrome Headless, then convert PNG to JPG | The documented screenshot output is PNG; set the viewport deliberately. |
| PHP script rendering local HTML | Spatie Browsershot | It relies on Puppeteer/headless Chrome; confirm the format behavior for your installed version. |
| Repeated captures of a page available online | ScreenshotNeo | It captures a reachable URL; it does not make a private local file remotely accessible. |
Frequently Asked Questions
Can an HTML file be converted to JPG without opening a browser window?
Yes. wkhtmltoimage and Chrome Headless are command-line renderers, so they can run without a visible browser window.
Will the JPG keep links and buttons clickable?
No. A JPG is a static image of rendered pixels, not an interactive copy of the webpage.
Can I convert a private file on my computer with ScreenshotNeo?
Not by sending a local path. ScreenshotNeo needs a URL it can reach; a file available only on your machine is not remotely accessible to the service.
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.




