How to Convert JPG to WebP with XnConvert

If you’re looking to manually create WebP versions from JPGs (or any other image file formats, for that matter), XnConvert is free, multiplatform, and is especially good at handling large batches of images.

Last Updated:
Topics: WebP

This post may include affiliate links. Read more.

There’s a bunch of different ways to convert JPGs to WebP. Some of the most convenient use an automated service linked to your website. Services like the Polish feature in Cloudflare Pro or the WebP modules in Imagify or ShortPixel. They work in various ways on your web server, and once you choose the settings, they’re set-and-forget services. They’ll create the WebP versions and serve them to (hopefully) compatible browsers.1

But sometimes you need to convert the files manually. And that’s what I’m focusing on here. There are several apps that can do this. The one that I’m using here is XnConvert. It’s free for personal use, cross-platform, powerful, and reliable. And it works great with large batches of images. You can download it here.

File Naming

Before you start the conversion process, there is an added consideration for WebP files when it comes to the file naming convention you use. One of the reasons I like to use XnConvert for converting JPGs to WebP is that it gives you a lot of flexibility over the filenaming. And, specifically, it doesn’t just assume that you want to replace the “.jpg” or “.jpeg” with “.webp”, as some of the conversion apps do.

Some web servers are set up to find and serve webp files that use this format that is a traditional file extension format: filename.webp.

Others are set up to use the format that retains the original extension, such as: filename.jpg.webp. So you’ll want to confirm how your web server is set up first.

In the output tab below, there’s an option for choosing how the .webp files are named. These are the filename recipes you’ll want to use for each case, depending on your server setup:

  • filename.webp –> {Filename With Ext}
  • fiename.jpg.webp –> {Filename}

How XnConvert Works

Here’s a quick walkthrough of how it works. I’m using a batch of JPGs here that are sized pretty typically for the web–1000 pixels on the longest edge. I’ve exported these (originally shot in RAW) from Lightroom with a quality setting of 80. I haven’t applied any other optimizations to these specific images–normally, I would run them through a couple more layers of optimization as JPGs first. So the file sizes are larger than I would normally be starting with on my website, but they’re still within a pretty typical web image range.

XnConvert’s interface basically works from left to right, using the tabs at the top. The first step is to add the files you want to convert using the Input tab.

You can work with a list layout or thumbnails; I’m using a list here, obviously. XnConvert is especially strong in handling large batches of many images. So you can add files or folders here–if you’re processing a large batch of images, you might find that using the list view is a bit quicker because it doesn’t have to render the thumbnails.

XnConvert JPG to WebP 1

The next part is to go to the Actions tab. Since I’m focusing here just on a straight conversion from JPG to WebP, I’m going to leave the actions blank in this example. But if you click on the “Add action>” button at the top left of the screen, you can access a huge number of transformations—anything from resizing to cropping to setting color profiles to special effects. And you can stack multiple actions here, making it a very powerful tool. But we don’t need to use any of that here.

XnConvert JPG to WebP 2

The Output tab is where the magic happens. This is where you choose the format and options for the conversion.

The first part is straightforward enough–you just select where you want to save the files and then the filename. If you’re planning to use these WebP images on a website–and that’s the typical use for them–then you’ll want to make sure you use the correct file naming convention for your server. There’s more on that above.

XnConvert JPG to WebP

The next step is to choose the output format. There’s a large number of options on the dropdown list. The one we want here is obviously WebP.

XnConvert JPG to WebP

Then, click on Settings. This is where some trial and error is going to come into play. If you set the quality setting too high, you can end up with WebP images that are larger than the original JPGs, which rather defeats the purpose of the exercise.

XnConvert JPG to WebP

If you’re looking for somewhere to start, I’d recommend using a quality setting somewhere around 80. And I’d recommend doing some test runs to check that the output quality is acceptable to you. You can creep it up if it’s isn’t, or creep it down if you want even smaller files. The aim is to find the sweet spot that passes muster for quality while also creating much smaller filesizes.

You’ll notice two other options here: filesize and lossless. The filesize option isn’t very useful here, because it forces the output files to be that size, even if it’s possible to get much smaller files. You can theoretically choose lossless, too. But while that sounds appealing in terms of image quality, a word of warning: the conversion process is slow, and the output files can end up being much larger than the original JPGs.

The other options aren’t strictly necessary, but they can be useful–especially the “Keep folder structure” one.

Once you hit the Convert button at the bottom right of the screen, it’ll move over automatically to the Status tab and show you a running progress screen.

And that’s about all there is to it.

Things Worth Knowing

Compressing JPGs? Isn’t that a No-No?

It’s worth mentioning that the creation of WebP images works differently than you might expect from a typical photography workflow. And it goes against some of the usual best practices.

That’s because WebPs are often created from JPGs. In other words, they’re often second-generation derivates from an already compressed JPG file. That’s not ideal for image quality, but it’s far more convenient for most implementations of WebP on web servers.

In those implementations, you compress a JPG, upload it to your web server, and then those JPGs are converted to WebP. And if you want to get technical, there’s even another layer in there, because many content management systems such as WordPress will create derivative thumbnail images from the JPGs you upload. So the WebP’s then become third-generation compressed derivative images. None of which is ideal.

In an ideal world, you’d create the WebP images directly from your original masters. That keeps the number of compressed-versions-of-already-compressed-images to the bare minimum. And if that works for your workflow in getting images from your camera to your website, that’s great!

So it’s worth noting that if you want to generate WebP from the original master uncompressed images manually–maybe from TIFF files–you can, and the same process applies here.2 It’s just doing it at a different stage in the workflow, and it’s not a convenient way to do it for most websites. But XnConvert will work just as happily with TIFF files as JPGs. Or PNGs, for that matter.

Why Use WebP Images?

If you’re getting warnings on your Core Web Vitals reports (or PageSpeed Insights or GTMetrix) to use next-generation image formats, WebP is one of those and is currently the best option in most cases.

Other popular alternatives include JPEG2000 (JP2) and JPEG XR (JXR), although those have not gotten nearly as much traction and are largely limited to specific browsers (Safari in JPEG2000’s case, and Internet Explorer in JPEG XR’s). There are also other even newer formats, such as AVIF and JPEG XL, that are designed to supersede WebP and might make more of a claim at some point down the road but, for now, are not widely compatible. So, for now, WebP is a good option.

As so often happens with anything to do with web browsers, there are disconnects between what browsers support what formats. For now, WebP seems to have the most traction. At the time of writing, Microsoft IE is still a holdout, but partial support has been added in Safari 14. All the other major browsers support WebP.

Serving WebP Images

This post is about the creation of WebP images, but the other part of the puzzle is serving them to compatible browsers. And that’s an entirely separate challenge. It’s also not as simple as it should be, and it’s beyond the scope of this post.

Some of the simplest options involve paid apps or services such as Cloudflare Pro (with Polish), BunnyCDN, Imagify, or ShortPixel (or several others). If you’re lucky, you might be able to just enable those services and be up and running. Chances are, though, that it will take some more technical tweaking on your server to get things set up properly.

There are also other methods that don’t involve paid apps or services, but those are generally more technical and require configuration on your server.

Or, if you’re using WordPress, the WebP Express plugin is worth a try.

Where to Find XnConvert

You can download XnConvert here. It’s free for personal use and cross-platform. If you’re using it for commercial/business use, there are very reasonable per-license fees.

XnConvert can convert from about 500 different formats and to about 70 different ones. So it’s one of those tools that’s very handy to just have sitting in the toolbox.


  1. Most of these image optimization services outsource the CPU-intensive process of the actual creation of the images to the service’s server rather than tie up your own, although there are exceptions, such as some configurations of EWWW Image Optimizer
  2. XnConvert can read RAW files, but it’s really not designed as a RAW processor and isn’t an ideal way to process RAW files. 

Leave a Comment