User Rating 0.0 β˜…β˜…β˜…β˜…β˜…
Total Usage 0 times
75%
px
Drop WebP or images here or click to browse · max 50 MB per file
Is this tool helpful?

Your feedback helps us improve.

β˜… β˜… β˜… β˜… β˜…

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.

webp compressor compress webp reduce webp size webp optimizer image compression webp quality

Formulas

The compression ratio and savings are computed from the raw byte sizes of the original and re-encoded blobs.

R = Soriginal βˆ’ ScompressedSoriginal Γ— 100%

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.

CR = SoriginalScompressed

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:

wout = min(win, wmax)  hout = wout Γ— hinwin

Where wmax is the user-specified maximum width and aspect ratio is preserved by deriving hout proportionally.

Reference Data

Quality SettingTypical Size ReductionPSNR Loss (dB)SSIM RangeBest Use Case
95 - 1005 - 15%< 0.50.99 - 1.00Archival, medical imaging
85 - 9420 - 35%0.5 - 1.50.97 - 0.99Photography portfolios
75 - 8435 - 55%1.5 - 3.00.94 - 0.97E-commerce product images
60 - 7455 - 70%3.0 - 5.00.90 - 0.94Blog illustrations, thumbnails
40 - 5970 - 82%5.0 - 8.00.84 - 0.90Social media previews
20 - 3982 - 90%8.0 - 12.00.75 - 0.84Placeholder / blur-up images
1 - 1990 - 97%> 12.0< 0.75Extreme bandwidth constraints
Format Comparison (at equivalent visual quality)
WebP vs JPEG25 - 34% smallerGoogle comparative study, 2023
WebP vs PNG (lossy)26 - 34% smallerLossless WebP vs PNG: ~26%
WebP max dimensions16383 Γ— 16383 px (VP8L spec limit)
WebP max file size4 GiB (RIFF container limit, ~232 bytes)
Browser Canvas limitVaries: Chrome ~16384px, Safari ~4096px on iOS
Alpha channelSupported in both lossy and lossless WebP
AnimationSupported (this tool processes first frame only)

Frequently Asked Questions

This happens when the original WebP was encoded at a lower quality than your selected setting, or when the source is a lossless WebP and you re-encode at near-100 lossy quality. The encoder adds lossy codec overhead that exceeds the original byte count. Lower your quality slider below the original encode threshold - typically below 75 - to see actual savings.
Yes. The Canvas API pipeline decodes pixel data only. All EXIF, XMP, ICC color profile, and RIFF metadata chunks are discarded during re-encoding. If you need to preserve metadata, use a server-side tool like cwebp with the -metadata flag.
Browsers expose only the quality parameter (0.0-1.0) via canvas.toBlob(). You cannot control spatial noise shaping (-sns), segmentation (-segments), filter strength (-f), or preprocessing (-pre). Chrome uses libwebp internally but with fixed partitioning. Results are close to cwebp -q N but not byte-identical. For production CDN pipelines, server-side encoding gives finer control.
Yes. The canvas is not pre-filled with a background color, so transparent pixels remain transparent in the output WebP. However, lossy encoding may introduce slight fringing at transparency edges. For critical alpha quality, keep quality above 85 or use lossless mode (quality 100 in some browsers triggers lossless).
It depends on your browser's canvas memory limit. Chrome allows approximately 16384 Γ— 16384 px on desktop. Safari on iOS caps at roughly 4096 Γ— 4096 px. Exceeding these limits causes the canvas to silently produce a blank image. The tool detects this and shows an error. Use the resize option to cap dimensions below your browser's limit.
Only the first frame is processed. The Canvas API does not expose animation frames from WebP. To compress animated WebP while preserving animation, use a CLI tool like webpmux combined with cwebp, or the libwebp API directly.