Compress WebP images to a target KB or MB limit
The Compress WebP to Size page is for WebP files that need to fit a maximum file-size requirement. It opens with a 100 KB target by default, but the target can be changed to one of the quick presets or entered as a custom value. The page keeps WebP as the output format rather than converting the image to JPEG or PNG. This makes it useful for website assets and other workflows where the receiving system accepts WebP.
The custom target field accepts values from 5 KB to 10,000 KB. Common presets include 10 KB, 20 KB, 30 KB, 50 KB, 100 KB, 200 KB, 500 KB, 1 MB and 2 MB. The compressor aims slightly below the chosen ceiling by using an internal safety margin. A target is still a maximum to work toward, not an exact file-size promise for every image.
The page accepts WebP image files and processes them in the browser through Canvas encoding. It can handle several selected files in one run. When a single image is compressed, the result is available as an individual WebP. When multiple files are selected, the tool packages the results in a ZIP archive. The original WebP files are not overwritten, so you can compare them and keep the better version.
How to compress WebP to a custom size
For multiple images, every file receives the same target setting and the resulting WebP files are placed in a ZIP archive. A batch can contain images with very different dimensions and visual complexity, so some may reach the target more easily than others. Check each result's reported status and actual size before using a batch for a strict upload requirement.
How quality search and resizing affect the result
The compressor draws the source image to a canvas and tests a low WebP quality setting first. If that version falls below an internal limit, it searches upward through a range of quality settings to find a higher-quality result that remains below the target. If the lowest quality is still too large, the tool can reduce the pixel dimensions proportionally and repeat the encoding process. This reduces the number of pixels as well as the file size.
The Keep Exact Dimensions switch prevents proportional resizing. With it enabled, the compressor can adjust quality but cannot shrink the image's width or height. A detailed image or a very tight target may therefore remain above the requested limit. If dimensions are not important to the destination, disabling the switch gives the compressor another way to reduce the file. Always review the final pixel dimensions when the WebP is used in a fixed-size layout or when another system requires particular width and height values.
The algorithm includes a safety margin below the requested size to reduce the chance of landing just over the ceiling.
Browser encoding results can still vary, and some images are difficult to reduce. If the tool reports that it could not reach the target, do not assume the file is compliant. Try a larger target, permit downscaling or prepare a smaller source image. For a strict KB requirement, the downloaded file's actual size is the final check.
Preserve the benefits of WebP
WebP supports lossy and lossless image encoding and can store transparency. In this tool's target-size workflow, the browser requests WebP canvas output with a variable quality setting. This is a lossy quality-search path, so fine texture and subtle detail can change as quality is reduced. Transparent pixels can be retained in the WebP result when the browser's WebP encoder supports the requested output. Check logos and cut-out graphics against a contrasting background to make sure their edges still look right.
WebP is well suited to many modern websites because it can provide smaller files than older formats for similar visual uses. However, not every legacy app, document portal or upload form accepts it. Before converting or compressing a file for a government form, office workflow, email attachment or older application, verify that WebP is permitted. If the destination requires JPEG or PNG, use the appropriate output tool instead of relying on a WebP file.
Browser support, privacy and final checks
This page uses browser-side image decoding, canvas drawing and WebP encoding. It does not send the image to a dedicated AVIF or WebP server encoder. A modern browser with WebP canvas support is required for the expected output. If a browser does not support the requested canvas format, browser APIs may behave differently, so inspect the downloaded file type and open the result before relying on its extension.
Before using the compressed WebP:
The right result is not simply the smallest WebP. It is a file that meets the size limit, retains sufficient detail and remains compatible with the system where it will be used.
Frequently Asked Questions
Set a WebP file-size ceiling and choose whether pixel dimensions can change
What is the default target for Compress WebP to Size?
Can I compress WebP to a specific KB or MB size?
Does the tool keep WebP as the output format?
Can I keep the original width and height?
Can the tool reduce pixel dimensions to reach the target?
Does WebP support transparency?
Will every image fit under the selected limit?
Can I compress multiple WebP images at once?
Are my WebP files uploaded to a server?
What if a website does not accept WebP?
Compress to a specific size
Choose a target size for forms, portals and uploads.
Related Tools
Explore more tools to optimize, convert, and manage your images.
Compress to 100KB
Compress JPG, PNG, and WebP images to strictly 100KB or less without losing clarity. Ideal for online forms and attachments.
Bulk Image Resizer
Resize multiple images at once with our free bulk image resizer. Batch resize JPG, PNG and WebP photos to any size in seconds.
HEIC to JPG
Convert HEIC to JPG online for free. Change iPhone and iPad HEIC or HEIF photos to JPG that open on Windows and Android. Batch conversion supported.
JPG to PDF Converter
Convert JPG images to PDF online free. Combine multiple photos into one PDF with custom margins, page size and orientation. 100% private, no signup.



