Logo
Home Products Support Contact About Us
arrow1 File Converters
arrow1 TIFF and PDF apps
arrow1 Forensic
arrow1 Freeware

Convert HTML to JPG via Command Line — Server Batch Converter

You need to render HTML pages as JPG images on a server — for thumbnails, archives, email previews, or product screenshots in an e-commerce pipeline. Spinning up a headless browser for every conversion is heavy, slow, and fragile across browser updates. Total HTML Converter X renders HTML files and live URLs to JPG from the command line, in batch, with no browser installation. Install it on a Windows server, call it from a script or via ActiveX, and let it run unattended.

What Total HTML Converter X Does

  • Batch JPG output — pass a wildcard (*.html) and the converter renders every matching file to JPG in one run
  • Quality control — set JPEG quality from 1 to 100 to balance file size against image fidelity
  • Image dimensions — constrain output width or height; the converter scales the rendering to fit
  • Live URL rendering — pass a URL instead of a file path and the converter fetches the page and renders it to JPG
  • CSS rendering — recognizes all HTML tags, CSS 1 and CSS 2 styles, inline images, and tables
  • Combine pages — render multi-page HTML output as one tall JPG instead of separate images
  • No GUI — runs silently from the command line with no pop-up windows or confirmation dialogs
  • ActiveX / COM — call the converter from .NET, VBScript, PHP, Python, or any COM-compatible environment to embed conversion into your own application
  • .bat scripting — save commands in batch files and schedule them with Windows Task Scheduler for fully automated conversion

HTML to JPG command line conversion

Download Free Trial

(30 days, no email)

Buy License

(server license, perpetual)

Windows 7/8/10/11 • Server 2008/2012/2016/2019/2022

HTML vs JPG: Why Convert?

HTML is a markup language designed for browsers. An HTML page is built from text, CSS rules, embedded images, and external resources. Rendering depends on the browser engine, installed fonts, and screen size. The same HTML can look different in Chrome, Firefox, and Edge, and may break entirely when external resources are unavailable.

JPG is a fixed raster image format. It captures the rendered page exactly as it appeared at conversion time, embeds nothing external, and opens in every image viewer, browser, and social-media platform. JPG files are small, easy to embed, and ideal for thumbnails, previews, and archival snapshots.

HTMLJPG
FormatMarkup with external dependenciesSelf-contained raster image
RenderingVaries by browser, fonts, screen sizeFixed pixels — identical everywhere
File sizeVariable; depends on linked resourcesSmall, controllable via quality setting
Use caseLive web displayThumbnails, previews, archival, email
EditabilitySource code editableRead-only image
Embed in emailOften blocked or brokenUniversal support

How to Convert HTML to JPG from the Command Line

Step 1. Install Total HTML Converter X

Download the installer from the link above and run it on your Windows server or workstation. The setup takes under a minute. No browser, no Microsoft Office, no .NET prerequisite — the converter ships with its own rendering engine that handles HTML tags, CSS 1/2 styles, and embedded images.

Step 2. Open the Command Prompt

Open cmd.exe or PowerShell. The converter executable is HTMLConverter.exe, located in the installation folder (typically C:\Program Files\CoolUtils\TotalHTMLConverterX\). Add it to your system PATH or use the full path in your commands.

Step 3. Run the Basic JPG Conversion

The simplest command converts all HTML files in a folder to JPG:

HTMLConverter.exe C:\Pages\*.html C:\Output\ -c JPEG

This processes every .html file in C:\Pages\ and saves a .jpg with the same base name in C:\Output\. One HTML file in, one JPG out.

Step 4. Set Quality and Dimensions

Control the JPG output with additional flags:

HTMLConverter.exe C:\Pages\*.html C:\Output\ -c JPEG -ImgQuality 90 -ImgWidth 1024
  • -ImgQuality 90 — JPEG quality from 1 (smallest, blocky) to 100 (highest fidelity, largest file). 85–92 is the typical sweet spot.
  • -ImgWidth 1024 — output width in pixels; the converter scales the rendering to fit
  • -ImgHeight 768 — output height in pixels; combine with width or use one or the other
  • -combine — render the entire HTML document as a single tall JPG instead of paginating
  • -log C:\Logs\html2jpg.log — write a conversion log for verification

Step 5. Convert a Live URL

Pass a URL instead of a file path:

HTMLConverter.exe https://example.com/report C:\Output\report.jpg -c JPEG -ImgQuality 90

The converter fetches the page (including remote stylesheets and images) and renders the result to JPG. This is useful for archiving live web pages, taking automated screenshots, and generating preview images on demand.

Step 6. Automate with a .bat File

Save your command in a .bat file and schedule it with Windows Task Scheduler:

@echo off
"C:\Program Files\CoolUtils\TotalHTMLConverterX\HTMLConverter.exe" C:\Incoming\*.html C:\Archive\JPG\ -c JPEG -ImgQuality 90 -ImgWidth 1280 -log C:\Logs\html2jpg.log

This runs at whatever interval you set (hourly, nightly, on file arrival via a watcher) and writes a log file so you can verify the results without watching the console.

ActiveX / COM Integration

Total HTML Converter X includes a full ActiveX interface. You can call the converter from any COM-compatible environment — .NET, VBScript, PHP, Python, Ruby, or ASP. This lets you embed HTML-to-JPG rendering into your own web application, intranet portal, or document workflow without shelling out to a command-line process.

Example (C#/.NET):

HTMLConverterX Cnv = new HTMLConverterX();
Cnv.Convert("C:\\Pages\\report.html", "C:\\Output\\report.jpg", "-c JPEG -ImgQuality 90 -ImgWidth 1024");

Example (PHP):

$c = new COM("HTMLConverter.HTMLConverterX");
$c->convert("C:\\Pages\\report.html", "C:\\Output\\report.jpg", "-c JPEG -ImgQuality 90");

The same call works from ASP.NET, VBScript, Python, Ruby, Perl, and JavaScript (Windows Script Host). Your web application can accept uploaded HTML or a URL and return a rendered JPG to the user in real time.

Online Converters vs Total HTML Converter X

For a one-off page, our free online convert HTML to JPG tool runs in the browser with no install. For server pipelines and bulk batches, Total HTML Converter X is the right choice.

FeatureOnline ConvertersTotal HTML Converter X
Batch processingOne file at a timeUnlimited files per batch
File privacyFiles uploaded to third-party serverFiles never leave your machine
JPEG quality controlFixed or limitedFull 1–100 quality range
Output dimensionsFixed or service-limitedAny width and height
CSS renderingBasic, inconsistentFull CSS 1/2 support
Live URL inputLimited; rate-limitedUnlimited URLs, your bandwidth
AutomationManual onlyCommand line, .bat, Task Scheduler, ActiveX
Server deploymentNot possibleDesigned for servers, no GUI
Requires internetYesNo (except for fetching remote URLs)

When You Need HTML to JPG Command-Line Conversion

  • Thumbnail generation. A content management system stores articles as HTML. The CMS calls Total HTML Converter X via ActiveX to produce JPG thumbnails for the homepage, social media previews, and category listings.
  • E-commerce product screenshots. An online store renders product detail pages (HTML templates) to JPG for embedding in marketing emails, sales sheets, and partner feeds. The converter runs nightly on the catalog.
  • Web page archival. Compliance teams need to preserve the visual state of a web page at a point in time. The command line takes a list of URLs and produces a folder of JPG snapshots, one per page, with timestamps in the filenames.
  • Email-safe rendering. Mail clients block remote images and break complex HTML. Pre-rendering an HTML newsletter or invoice to JPG gives every recipient an identical view, regardless of their email client.
  • Server-side preview generation. A document portal lets users upload HTML files. The portal calls the converter to produce a JPG preview shown next to each upload, without spinning up a headless browser.
  • Replacing headless browser pipelines. Headless Chrome and Puppeteer are heavy, fragile across version updates, and need careful sandboxing. Total HTML Converter X is a single executable with predictable resource use and no browser update treadmill.

Why Total HTML Converter X

No Browser Required

The converter uses its own rendering engine to parse HTML and CSS. You do not need Chrome, Firefox, or any browser installed on the server. This eliminates browser update issues, reduces the server footprint, and avoids the instability of headless browser automation.

True Server Application

Total HTML Converter X is designed for unattended use. No GUI windows, no dialog boxes, no confirmation prompts. It runs silently from the command line or as part of a service — exactly what a production server needs.

Predictable Image Output

Set quality, set dimensions, set whether to combine multi-page output. Every call produces an identical result for identical input. No version drift, no rendering surprises after a Chrome update.

One Tool, Many Targets

The same command-line tool converts HTML to PDF, DOC, XLS, TIFF, JPG, RTF, TXT, and more. One installation covers every HTML conversion need. Change -c JPEG to -c PDF or -c TIFF and you get the alternate output with the same batch and automation features.

Download Free Trial

(30 days, no email or credit card)

Buy License

(server license, perpetual)

Windows 7/8/10/11 • Server 2008/2012/2016/2019/2022


quote

Total HTML Converter X Customer Reviews 2026

Rate It
Rated 4.7/5 based on customer reviews
5 Star

"We replaced a Puppeteer-based screenshot pipeline with Total HTML Converter X about a year ago. The Puppeteer setup needed constant babysitting after Chrome updates and consumed ~400 MB of RAM per worker. The CoolUtils command line takes a fraction of the resources, never breaks on updates, and produces consistent JPG output. We render about 40,000 product pages a night without a single failure."

5 Star Marek Dvorak Senior Backend Engineer

"Our regulator requires us to archive web pages as image snapshots with timestamps. I wrote a small .bat script that pulls a list of URLs from a CSV and runs HTMLConverter.exe against each one, naming the output JPGs with the date. It runs on a Windows Server 2019 box, uses a few percent of CPU, and produces clean, identical-looking screenshots regardless of when the script runs."

5 Star Janelle Foster Compliance Manager

"I integrated the ActiveX interface into our PHP intranet to render HTML report pages as JPG previews. The COM call took about ten lines of code. Output quality at 90% JPEG is excellent and the dimensions flag lets me match our thumbnail grid exactly. The only thing I would like is a Linux build, but on the Windows backend this does exactly what we need."

4 Star Rohan Mehta Full-Stack Developer

FAQ ▼

The basic command is: HTMLConverter.exe C:\Pages\*.html C:\Output\ -c JPEG. This renders every HTML file in the source folder to a JPG with the same base name. Add -ImgQuality, -ImgWidth, or -combine to control the output.
No. Total HTML Converter X uses its own rendering engine to parse HTML and CSS. No Chrome, Firefox, or any other browser is required. There is no headless browser dependency to maintain.
Yes. The -ImgQuality flag accepts any value from 1 (smallest, blocky) to 100 (highest fidelity, largest file). Values between 85 and 92 are the typical sweet spot for web use.
Yes. Use -ImgWidth and/or -ImgHeight to set output dimensions in pixels. The converter scales the rendered page to fit the target size while preserving the layout.
Yes. Pass a URL as the source instead of a file path: HTMLConverter.exe https://example.com/page C:\Output\page.jpg -c JPEG. The converter fetches the page (and any remote stylesheets and images) and renders the result to JPG.
Yes. Total HTML Converter X recognizes all standard HTML tags, CSS 1 and CSS 2 styles, inline images, and HTML tables. It renders pages faithfully without relying on an external browser engine.
Yes. Total HTML Converter X registers as a COM/ActiveX object (HTMLConverter.HTMLConverterX). You can call it from .NET, PHP, Python, VBScript, ASP, Ruby, Perl, and any other COM-compatible environment.
Yes. Add the -combine flag and the converter renders the entire HTML document as a single tall JPG instead of paginating into multiple images.

 

Start working now!

Download free trial and convert your files in minutes.
No credit card or email required.

⬇ Download Free Trial Windows 7/8/10/11 • 228 MB

C++ sample
Power Basic sample
VBScript sample

Examples of Total HTML Converter X

Convert HTML files With .NET by TotalHTMLConverterX and .NET


string src="C:\\test\\Source.HTML";
string dest="C:\\test\\Dest.PDF";

HTMLConverterX Cnv = new HTMLConverterX();
Cnv.Convert(src, dest, "-c PDF -log c:\\test\\HTML.log");

MessageBox.Show("Convert complete!");

Download
.NET HTML Covnerter example
Server samples in C# specifically for ASP.net
Client application with WinForms in C#

Convert HTML & MHT Files On Web Servers With Total HTML Converter X

dim C
Set C=CreateObject("HTMLConverter.HTMLConverterX")
C.Convert "c:\source.HTML", "c:\dest.JPG", "-cJPG -log c:\html.log"
C.Convert "https://www.coolutils.com/", "c:\URL Page.PDF", "-cPDF -log c:\html.log"
set C = nothing
Example2 ASP: directly stream the resulting PDF
dim C
Set C=CreateObject("HTMLConverter.HTMLConverterX")
Response.Clear
Response.AddHeader "Content-Type", "binary/octet-stream"
Rresponse.AddHeader "Content-Disposition", "attachment; filename=test.pdf"
Response.BinaryWrite
  c.ConvertToStream("C:\www\ASP\Source.html", "C:\www\ASP", "-cpdf  -log c:\html.log")
set C = nothing

Convert HTML & MHT Files On Web Servers With Total HTML Converter X

Example PHP:
$src="C:\\test\\test.html";
$dest="C:\\test\\test.pdf";
if (file_exists($dest)) unlink($dest);
$c= new COM("HTMLConverter.HTMLConverterX");
$c->convert($src,$dest, "-c pdf -log c:\\HTML.log");
if (file_exists($dest)) echo "OK"; else echo "fail:".$c->ErrorMessage;

Convert HTML Files With Total HTML Converter X and Ruby

require 'win32ole'
c = WIN32OLE.new('HTMLConverter.HTMLConverterX')

src="C:\\test\\test.html";
dest="C:\\test\\test.tiff";

c.convert(src,dest, "-c TIFF -log c:\\test\\HTML.log");

if not File.exist?(dest)
  puts c.ErrorMessage
end

Convert HTML files With Total HTML ConverterX and Python

import win32com.client
import os.path

c = win32com.client.Dispatch("HTMLConverter.HTMLConverterX")

src="C:\\test\\test.eml";
dest="C:\\test\\test.tiff";

c.convert(src, dest, "-c TIFF -log c:\\test\\HTML.log");

if not os.path.exists(file_path):
  print(c.ErrorMessage)

Convert HTML files With Pascal and Total HTML Converter X

uses Dialogs, Vcl.OleAuto;

var
  c: OleVariant;
begin
  c:=CreateOleObject('HTMLConverter.HTMLConverterX');
  C.Convert('c:\test\source.html', 'c:\test\dest.tiff', '-c TIFF -log c:\test\HTML.log');
  IF c.ErrorMessage<>'' Then
    ShowMessage(c.ErrorMessage);
end;

Convert HTML Files On Web Servers With Total HTML Converter X

var c = new ActiveXObject("HTMLConverter.HTMLConverterX");
c.Convert("C:\\test\\source.html", "C:\\test\\dest.pdf", "-c PDF");
if (c.ErrorMessage!="")
  alert(c.ErrorMessage)

Convert HTML files With Total HTML Converter X and Perl

use Win32::OLE;

my $src="C:\\test\\test.html";
my $dest="C:\\test\\test.tiff";

my $c = CreateObject Win32::OLE 'HTMLConverter.HTMLConverterX';
$c->convert($src,$dest, "-c TIFF  -log c:\\test\\HTML.log");
print $c->ErrorMessage if -e $dest;
If you need examples on other languages please contact us. We will create any example specially for you.

Support
Total HTML Converter X Preview1

Latest News

Newsletter Subscribe

No worries, we don't spam.


© 2026. All rights reserved. CoolUtils File Converters

Cards