The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Use Pillow to open the WebP, convert it to an RGB image, and save it as JPEG:
from PIL import Image
with Image.open('input.webp') as im:
im.convert('RGB').save('output.jpg', 'JPEG', quality=90, optimize=True)
The RGB conversion is important because JPEG has no alpha channel and cannot represent every mode that a WebP file may use. The sections below cover single files, folders, transparent images, streams, animated WebP files, and common failures.
Install Pillow and verify WebP support
Install Pillow in the Python environment that will run the conversion:
python -m pip install Pillow
Pillow reads and writes WebP when its WebP capability is available. The format documentation specifies libwebp version 0.5.0 or later. A normal current Pillow installation usually includes the needed support, but deployment images and custom builds should be checked explicitly.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Confirm the installation and inspect the feature set:
python -c "from PIL import Image, features; print(Image.__version__); print(features.check('webp'))"
A result of True indicates that the installed build reports WebP support. If it is false, reinstall Pillow in the active environment and verify that the native libwebp dependency is present in the operating system or container image.
Convert one WebP file to JPG
Pillow determines the input format from the file contents, so you do not need to tell Image.open that the source is WebP. Supply the JPEG format when saving; doing so avoids ambiguity and works even when the destination name does not end in .jpg.
from PIL import Image
with Image.open('input.webp') as im:
rgb = im.convert('RGB')
rgb.save('output.jpg', 'JPEG', quality=90, optimize=True)
quality=90 and optimize=True are optional JPEG-writing settings. Choose a quality appropriate to your visual and file-size requirements, and keep the original WebP if you may need to repeat the conversion at another setting.
Free tools Windows power users keep installed
One-click scans. No signup required.
Use a reusable function
from pathlib import Path
from PIL import Image
def webp_to_jpg(source: str | Path, destination: str | Path, quality: int = 90) -> None:
with Image.open(source) as im:
im.convert('RGB').save(destination, 'JPEG', quality=quality, optimize=True)
webp_to_jpg('input.webp', 'output.jpg')
The destination parent directory must already exist, and the process needs permission to read the source and create the output.
Handle transparency before writing JPEG
WebP can contain an alpha channel; JPEG cannot. Calling convert('RGB') removes transparency, so transparent pixels need a deliberate background policy. If you simply convert, the result uses Pillow’s RGB conversion behavior and transparent areas will not remain transparent.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Composite onto a chosen background
For a predictable result, flatten an RGBA image over a documented color before converting:
from PIL import Image
def webp_to_jpg_with_background(source, destination, background=(255, 255, 255)):
with Image.open(source) as im:
rgba = im.convert('RGBA')
canvas = Image.new('RGB', rgba.size, background)
canvas.paste(rgba, mask=rgba.getchannel('A'))
canvas.save(destination, 'JPEG', quality=90, optimize=True)
webp_to_jpg_with_background('logo.webp', 'logo.jpg', background=(255, 255, 255))
Use a different RGB tuple when the design requires another background. Record that choice because it changes the appearance of transparent edges and pixels.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →When RGB conversion is enough
If the WebP is already opaque, direct RGB conversion is sufficient. It also safely handles palette-based or otherwise incompatible modes before the JPEG writer receives the image.
Batch-convert a directory
pathlib makes it straightforward to preserve each source stem while changing the suffix:
from pathlib import Path
from PIL import Image
source_dir = Path('images')
for src in source_dir.glob('*.webp'):
dst = src.with_suffix('.jpg')
try:
with Image.open(src) as im:
im.convert('RGB').save(dst, 'JPEG', quality=90, optimize=True)
print(f'Converted {src} -> {dst}')
except OSError as exc:
print(f'Skipped {src}: {exc}')
The try/except keeps one corrupt or unsupported file from stopping the entire directory. Use rglob('*.webp') instead of glob when nested folders should be included.
Keep output in a separate folder
Writing beside the source is convenient, but a separate destination avoids collisions and preserves the originals:
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
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
from pathlib import Path
from PIL import Image
src_root = Path('webp-images')
dst_root = Path('jpg-images')
dst_root.mkdir(parents=True, exist_ok=True)
for src in src_root.rglob('*.webp'):
relative = src.relative_to(src_root).with_suffix('.jpg')
dst = dst_root / relative
dst.parent.mkdir(parents=True, exist_ok=True)
try:
with Image.open(src) as im:
im.convert('RGB').save(dst, 'JPEG', quality=90, optimize=True)
except OSError as exc:
print(f'Skipped {src}: {exc}')
This preserves the relative directory layout while leaving every WebP untouched.
Convert WebP data in memory
When the source arrives from an upload, object storage, or an HTTP response, use a file-like object. Pillow cannot infer a save format from a stream, so pass format='JPEG' explicitly.
from io import BytesIO
from PIL import Image
with Image.open('input.webp') as im:
out = BytesIO()
im.convert('RGB').save(out, format='JPEG', quality=90, optimize=True)
jpeg_bytes = out.getvalue()
# jpeg_bytes can now be uploaded or returned by an API
For a stream source, wrap the bytes in BytesIO before opening:
from io import BytesIO
from PIL import Image
def convert_webp_bytes(webp_bytes: bytes) -> bytes:
with Image.open(BytesIO(webp_bytes)) as im:
output = BytesIO()
im.convert('RGB').save(output, format='JPEG', quality=90, optimize=True)
return output.getvalue()
Animated WebP requires a frame decision
A WebP may contain multiple frames. Pillow exposes frame information, but saving a multiframe image as JPEG produces a still image and defaults to the first frame. That is correct only when the first frame is the one you want.
Inspect and export every frame
from pathlib import Path
from PIL import Image
src = Path('animation.webp')
out_dir = Path('frames')
out_dir.mkdir(exist_ok=True)
with Image.open(src) as im:
frame_count = getattr(im, 'n_frames', 1)
for index in range(frame_count):
im.seek(index)
frame = im.convert('RGB')
frame.save(out_dir / f'{src.stem}-{index:04d}.jpg', 'JPEG', quality=90, optimize=True)
Choose between one representative still, one JPG per frame, or an output format that supports animation. Do not assume that a single JPG preserves motion.
Troubleshoot common conversion errors
“cannot identify image file”
The path may point to a non-image response, a truncated download, or a corrupt file. Check the bytes independently, confirm the path, and try opening the file with an image viewer. Catch OSError per file in batch jobs so one bad input is reported rather than terminating the run.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
WebP support is unavailable
If Pillow reports that WebP support is not installed, reinstall a Pillow build with WebP enabled and verify libwebp 0.5.0 or later is available in the runtime environment. This can occur when development and production use different Python environments or when a minimal container omits native libraries.
“cannot write mode RGBA as JPEG”
JPEG has no alpha channel. Convert to RGB, or first composite the RGBA image onto an explicit background as shown above. The same safeguard handles palette and other modes that the JPEG writer cannot accept directly.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsThe output is black, has a halo, or loses transparent details
That is a background-policy issue, not a filename issue. Flatten the image against the intended background before RGB conversion and inspect semi-transparent edges at the final display size.
A stream save fails or creates an empty result
Pass format='JPEG' to save when writing to BytesIO or another file-like object. A stream has no filename extension from which Pillow can infer the format; also call getvalue() only after saving.
Only one frame appears from an animated source
That is Pillow’s default still-image behavior for multiframe input. Inspect n_frames, seek each frame when needed, and decide whether to emit multiple JPGs or retain an animated format.
The batch job cannot create files
Check that the destination directory exists, create it with mkdir(parents=True, exist_ok=True), and verify filesystem permissions and available disk space. Keep source and destination directories separate when reruns must be safe.
Recommended Free Tools
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Performance, quality, and operational choices
- One-off conversion: open one file, convert to RGB, and save explicitly as JPEG.
- Batch conversion: iterate with
pathlib, preserve stems, and catchOSErrorfor each source. - Transparency: choose and document a background before flattening; JPEG cannot preserve alpha.
- Streams: use
BytesIOand always pass the output format. - Animation: inspect frame count and export intentionally instead of assuming the first frame is acceptable.
- Quality: adjust JPEG quality for the target use, but retain the WebP originals when future re-encoding may be required.
For large folders, process files incrementally rather than loading all outputs into memory. In-memory conversion is useful for web services, while path-based conversion is simpler for scheduled jobs and local migrations.
Or skip the browser setup
If the WebP images originate as pages you need to capture, ScreenshotNeo can return a clean screenshot from one API request. It is a webpage screenshot API, not a replacement for Pillow when you already have local WebP files. The request below captures a page as WebP; use the resulting file as an input to the Python conversion code above if you specifically need a JPG.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo documentation for all parameters. Cookie and consent banners, newsletter popups, and chat widgets are removed before capture. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and each response identifies the page verdict and billing status in its 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 per month with no card; paid plans start at $5 for 3,000 shots.
Start with the free ScreenshotNeo account if you want the capture step handled without configuring a browser.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Frequently Asked Questions
Should I overwrite the original WebP file?
Usually no. Save to a separate .jpg path or destination directory so you can change JPEG quality, revisit transparency decisions, or recover from a failed batch without losing the source.
Can I use this conversion in an upload API?
Yes. Read the uploaded bytes into BytesIO, open them with Pillow, convert to RGB, save with format=’JPEG’ into another BytesIO, and return or store those bytes after validating size and permissions.
Why does changing only the extension not convert the image?
A filename suffix does not change encoded pixels. Pillow must decode the WebP and write a new JPEG file; use Image.open followed by save(…, ‘JPEG’).
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.

