FormatDrop
How-To Guide

How to Convert JPG to WebP on Linux

Linux has excellent WebP support via Google's official cwebp command-line tool, ImageMagick, and GIMP. This guide covers all three approaches for converting JPG to WebP on any Linux distribution.

Step-by-step instructions

  1. 1

    Install cwebp (Google's reference encoder)

    Ubuntu/Debian: sudo apt install webp. Fedora: sudo dnf install libwebp-tools. Arch: sudo pacman -S libwebp. Verify: cwebp -version.

    Go to converter
  2. 2

    Convert a single JPG to WebP

    cwebp -q 80 input.jpg -o output.webp. The -q flag sets quality (0–100). For lossless conversion: cwebp -lossless input.jpg -o output.webp.

  3. 3

    Batch convert a folder of JPGs

    for f in *.jpg; do cwebp -q 80 "$f" -o "${f%.jpg}.webp"; done. For recursive conversion: find . -name '*.jpg' -exec sh -c 'cwebp -q 80 "$1" -o "${1%.jpg}.webp"' _ {} \;

  4. 4

    Convert with ImageMagick

    sudo apt install imagemagick. Then: convert input.jpg -quality 80 output.webp. Batch: mogrify -format webp -quality 80 *.jpg (converts all JPGs in the current directory to WebP).

Why convert JPG to WebP?

WebP images are 25–35% smaller than JPG, reducing bandwidth and improving website load times. Linux developers use WebP conversion extensively for optimising assets in CI/CD pipelines.

Your files never leave your device

FormatDrop runs the conversion engine entirely inside your browser using WebAssembly. No file upload. No server. Nothing stored. You can verify this by opening DevTools → Network tab and watching: zero upload requests.

Frequently asked questions

Is cwebp or ImageMagick better for JPG to WebP?
cwebp (Google's reference encoder) produces slightly smaller files with better quality — it uses Google's optimised algorithm. ImageMagick is more convenient for complex batch operations with file management. For pure quality, use cwebp.
How do I convert WebP back to JPG on Linux?
Use dwebp: dwebp input.webp -o output.png (dwebp only outputs PNG). For JPG: convert input.webp output.jpg (ImageMagick) or ffmpeg -i input.webp output.jpg.
Convert JPG to WebP Now — Free

No account. No upload. Works in any browser.