Compress WebP
Compress WebP images online with adjustable quality. Reduce file size up to 90% while preserving visual clarity. Free, private, runs entirely in your browser.
About
WebP lossy compression operates on a block-prediction model derived from VP8 video codec. The encoder partitions each frame into macroblocks, applies spatial prediction, then quantizes the residual transform coefficients. Reducing the q parameter increases quantization step size, discarding high-frequency detail first. A file saved at quality 80 typically loses 2 - 4 dB of PSNR relative to the original, yet achieves 40 - 60% byte reduction. Choosing the wrong quality floor can produce visible banding in gradients or ringing around edges. This tool re-encodes through the browserβs native WebP codec via Canvas, so results depend on your browserβs libwebp build. It approximates server-side cwebp output but does not expose advanced flags like -segments or -sns.
Batch uploads are processed sequentially to avoid exceeding the browser memory budget. Alpha channels are preserved during re-encoding. Note: lossless-to-lossy conversion always introduces generation loss. If your source is already a heavily compressed JPEG converted to WebP, re-compressing yields diminishing returns and may enlarge the file at quality settings above the original encode threshold.
Formulas
The compression ratio and savings are computed from the raw byte sizes of the original and re-encoded blobs.
Where R is the reduction percentage, Soriginal is the original file size in bytes, and Scompressed is the output blob size. A negative R indicates the output grew larger than the input, which occurs when re-encoding an already-optimized file at a higher quality setting.
The compression ratio CR expresses how many times smaller the output is. A CR of 3.0 means the file is one-third its original size.
When optional resizing is applied, the canvas dimensions are capped:
Where wmax is the user-specified maximum width and aspect ratio is preserved by deriving hout proportionally.
Reference Data
| Quality Setting | Typical Size Reduction | PSNR Loss (dB) | SSIM Range | Best Use Case |
|---|---|---|---|---|
| 95 - 100 | 5 - 15% | < 0.5 | 0.99 - 1.00 | Archival, medical imaging |
| 85 - 94 | 20 - 35% | 0.5 - 1.5 | 0.97 - 0.99 | Photography portfolios |
| 75 - 84 | 35 - 55% | 1.5 - 3.0 | 0.94 - 0.97 | E-commerce product images |
| 60 - 74 | 55 - 70% | 3.0 - 5.0 | 0.90 - 0.94 | Blog illustrations, thumbnails |
| 40 - 59 | 70 - 82% | 5.0 - 8.0 | 0.84 - 0.90 | Social media previews |
| 20 - 39 | 82 - 90% | 8.0 - 12.0 | 0.75 - 0.84 | Placeholder / blur-up images |
| 1 - 19 | 90 - 97% | > 12.0 | < 0.75 | Extreme bandwidth constraints |
| Format Comparison (at equivalent visual quality) | ||||
| WebP vs JPEG | 25 - 34% smaller | Google comparative study, 2023 | ||
| WebP vs PNG (lossy) | 26 - 34% smaller | Lossless WebP vs PNG: ~26% | ||
| WebP max dimensions | 16383 Γ 16383 px (VP8L spec limit) | |||
| WebP max file size | 4 GiB (RIFF container limit, ~232 bytes) | |||
| Browser Canvas limit | Varies: Chrome ~16384px, Safari ~4096px on iOS | |||
| Alpha channel | Supported in both lossy and lossless WebP | |||
| Animation | Supported (this tool processes first frame only) | |||