About Compress Image to Size
Most compressors ask for a quality percentage and leave you guessing whether the file will pass a size limit. This tool starts from the limit instead: pick a target such as 50 KB for a job application or 100 KB for an upload form, and it measures real encoded sizes while lowering quality and, only when necessary, pixel dimensions.
Everything happens inside your browser with the Canvas API, so the photo is never uploaded. Each attempt is encoded and measured for real, which means the reported size is the size of the file you download, not an estimate. The panel shows the quality level and pixel dimensions that were used, so you can judge the trade-off before submitting the image.
What this tool does
Compress to a size limit
Choose 20, 50, 100, 200 or 500 KB, or type a custom target, and the tool searches for the largest encoded file that stays within it.
Real measured output
Every attempt is encoded and measured, so the size shown is the actual download size rather than a guess.
Quality and dimensions reported
Results list the quality level, final pixel dimensions and the percentage saved, so nothing about the trade-off is hidden.
JPG or WebP output
Use JPG for maximum compatibility or WebP for a smaller file; transparent areas are kept in WebP and filled with white in JPG.
Optional width and height caps
Add a maximum width or height when the destination also limits pixels; images are never enlarged beyond their original size.
Honest impossible-target warning
If a target cannot be reached at a usable quality and size, the tool reports the smallest file it could produce instead of pretending.
How to use Compress Image to Size
- 01
Add one image
Drop a JPG, PNG or WebP file of up to 50 MB onto the page, or click to browse.
- 02
Set the target size
Pick a preset such as 100 KB or enter your own KB value. Optionally cap the width or height if the form also limits pixels.
- 03
Choose JPG or WebP
JPG is accepted almost anywhere; WebP usually produces a smaller file at the same visual quality.
- 04
Compress to the target
The tool tests quality levels and, only when needed, smaller dimensions, measuring every encoded result.
- 05
Review and download
Check the actual size, quality and dimensions, then download. If the target was not reached, the warning explains the best possible result.
Supported formats and limits
- Input
- JPGPNGWebP
- Output
- JPG or WebP
- Processing
- Client-side, in your browser. Nothing is uploaded.
- Maximum size
- 50 MB per file
- Requirements
- A modern browser with Canvas and WebP encoding support (Chrome, Edge, Firefox or Safari) · No installation, account or upload: processing stays on your device
Limitations worth knowing
- Targets are limits, not guarantees: the result lands at or slightly below the target, and exact bytes can differ between browsers and encoder versions.
- Very small targets force visible quality loss and sometimes a much smaller image; text and fine detail suffer first.
- JPG output flattens transparency onto white, and any re-encode drops EXIF metadata such as capture time and GPS location.
- Images above roughly 50 megapixels may fail in a browser tab because of memory limits.
Privacy and file handling
Your image is decoded, measured and re-encoded entirely in this browser tab. Nothing is uploaded to a server, no copy is stored or logged, and the tool works offline once the page has loaded. Downloading the result saves the file directly to your device.
Read the full privacy policy