Skip to main content

WebP Image Converter

A fast, safe batch image-to-WebP converter for Windows with an interactive Terminal UI (TUI) and a scriptable CLI, powered purely by Pillow (libwebp) — no external binaries required.

Looking for v1.0 (Flask Web UI, cwebp/ExifTool, and Stable Diffusion metadata)? Check out the v1.0.0 git tag.

Features

  • Interactive Terminal UI (webp-converter): Browse folders, preview file counts and sizes, adjust settings, watch live per-file progress and space saved, or cancel mid-batch.
  • Scriptable CLI: Pass a folder path and flags for automated/batch workflows with clean exit codes (0 success, 1 partial failure/skip, 2 fatal error).
  • Pure Python / Pillow: Converts JPG, JPEG, PNG, TIFF/TIF, BMP, and GIF (including animated GIFs to animated WebP) in-process — no cwebp.exe or ExifTool setup needed.
  • Lossy or pixel-exact lossless: Configurable quality (0–100) and compression effort (method 0–6), or lossless encoding with exact RGB preservation under transparency.
  • Metadata preservation: Carries over EXIF tags, ICC color profiles, XMP packets, and standard PNG/GIF/BMP text comments (Author, Software, Comment, Creation Time), and automatically applies EXIF orientation to static images.
  • Safe by default:
    • Original files are kept unless --delete-originals (or the TUI toggle) is enabled.
    • Files are written atomically via temp files and originals are only removed after verified output.
    • Never overwrites silently: photo.jpg + photo.png become photo_jpg.webp + photo_png.webp, and existing .webp files are left alone unless --overwrite is set.

Requirements

  • Windows 10 / 11 (Windows Terminal recommended for the TUI)
  • Python 3.9 or higher

Installation

Using uv or pipx (adds webp-converter to your PATH in an isolated environment):

uv tool install webp-tui
# or
pipx install webp-tui

Or with pip:

pip install webp-tui

After installation, webp-converter can be launched from any folder in PowerShell, Command Prompt, or Windows Terminal.

Installing from local source (development)

# Global editable install with uv:
uv tool install -e .

# Or inside a virtual environment:
pip install -e ".[dev]"

Running without installing globally

pip install -r requirements.txt
python WebP-Image-Converter.py

Or double-click / run run-webp-converter.bat.

Usage

Interactive Terminal UI (TUI — Default)

Run with no arguments, or pass a starting folder path:

webp-converter
# or open directly on a folder:
webp-converter C:\Users\Name\Pictures\Batch

Keybindings inside the TUI:

  • Ctrl+R: Start conversion
  • Ctrl+D: Dry run (preview output filenames without modifying files)
  • Esc: Cancel a running batch
  • Ctrl+Q: Quit

Command-Line Interface (CLI — Secondary)

Pass --cli along with a folder path and flags for headless/scripted runs:

webp-converter --cli C:\Users\Name\Pictures\Batch [OPTIONS]

Options

  • --cli: Run in headless command-line mode instead of opening the TUI
  • --tui: Force the interactive terminal UI (default)
  • --quality, -q: WebP quality 0–100 (default: 90)
  • --lossless / --lossy: Pixel-exact lossless encoding / force lossy
  • --method, -m: WebP compression effort 0–6 (0 fastest, 6 smallest; default: 4)
  • --keep-originals: Keep original files after conversion (default)
  • --delete-originals: Delete original files after successful conversion
  • --overwrite: Overwrite existing .webp files instead of choosing a new name
  • --recursive / --no-recursive: Scan subfolders recursively (default) or top-level only
  • --workers, -w: Number of worker threads (default: CPU count)
  • --dry-run: Preview planned conversions without modifying any files
  • --formats: Supported extensions (default: .jpg .jpeg .png .tif .tiff .bmp .gif)
  • --log-file: Write detailed logs to a file
  • --verbose, -v: Enable debug logging
  • --config: Path to a JSON configuration file

Examples

# Convert a folder at quality 85
webp-converter --cli D:\Photos --quality 85

# Lossless conversion, deleting originals only after success
webp-converter --cli D:\Screenshots --lossless --delete-originals

# Top-level folder only, dry run
webp-converter --cli D:\Uploads --no-recursive --dry-run

# Maximum compression effort with 8 worker threads
webp-converter --cli D:\Exports -q 80 -m 6 -w 8

Configuration

Settings can be saved from the TUI (Save Config) or edited in config.json (or %APPDATA%\webp-converter\config.json when installed globally):

{
    "webp_quality": 90,
    "lossless": false,
    "method": 4,
    "delete_originals": false,
    "overwrite": false,
    "recursive": true,
    "supported_formats": [".jpg", ".jpeg", ".png", ".tif", ".tiff", ".bmp", ".gif"],
    "max_workers": 8
}

Command-line flags always override config.json.

Running the tests

pip install -r requirements-dev.txt
python -m pytest

Metadata

Release files for webp-tui 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for webp-tui 2.0.1
File Size Uploaded Provenance Actions
webp_tui-2.0.1.tar.gz 25.1 kB Without provenance Details for webp_tui-2.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for webp-tui 2.0.1
File Interpreter ABI Platform Actions
webp_tui-2.0.1-py3-none-any.whl Python 3 none any Details for webp_tui-2.0.1-py3-none-any.whl

Total release size: 46.7 kB

Release files / webp_tui-2.0.1.tar.gz

Download URL webp_tui-2.0.1.tar.gz
Size 25.1 kB
Tags Source
SHA-256 checksum
How to use checksums
57eca3028bb831e88eef40ee014659a485ec528aa2712766b5177795eae6b9a5
BLAKE2b-256 checksum
How to use checksums
1922bdb2fcdf966638001b754af7c43aecf643f861f5f3fdd051925845df0ca5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / webp_tui-2.0.1-py3-none-any.whl

Download URL webp_tui-2.0.1-py3-none-any.whl
Size 21.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a6dde6c7babaddc5edfd94464929d14d08ac3d9a45e952fc160d746a76ef0e8
BLAKE2b-256 checksum
How to use checksums
db01efea706bcacc066e468532e398fd7944ceaf5382717862aa395aa0b34110
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for webp-tui 2.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page