Home / Image / Compress Image to Size
Compress Image to Size
Shrink a photo to an exact file size like 20 KB, 50 KB or 100 KB by searching quality and dimensions.
Free, no uploads, no sign-up. Runs 100% in your browser.
How Compress Image to Size works
The image is decoded in your browser, then encoded again and again with MozJPEG (or libwebp / libavif) while a binary search finds the highest quality that still fits under your target. If even the lowest quality is too big, the image is scaled down step by step until it fits.
Input: JPG, PNG, WEBP, AVIF, HEIC, TIFF, BMP, GIF. Output: JPG, WEBP, AVIF.
How to use Compress Image to Size
- Drop one or more images.
- Type the target size or pick a preset such as 50 KB.
- Choose JPG, WEBP or AVIF and press Compress.
- Download the result or a ZIP of all files.
Tips
- Government and job forms often want JPG under 50 KB or 100 KB. Keep JPG selected for those.
- Leave "Allow smaller dimensions" on for very small targets. A smaller sharp image beats a blurry big one.
Compress Image to Size FAQ
- Is my file uploaded?
- No. Everything runs in this browser tab on your own device. Engines are downloaded once and cached, but your files never leave your computer.
- Why is the result a bit under my target?
- The tool picks the best quality that stays at or below the limit, so the file is usually a few percent smaller than the number you typed.
- Are my files uploaded?
- No. This tool runs entirely in your browser tab. Files are read from your disk into memory and the result is generated locally.
- Is it free? Are there limits or watermarks?
- Free and open source (MIT). There are no file-size caps, daily quotas, accounts or watermarks.
- Does it work offline?
- Yes, once the page (and any engine it needs) has loaded, it keeps working without a connection thanks to the service worker cache.
Related tools
- Image Compressor: Shrink images in bulk with quality and width controls and live savings.
- Image Resizer: Resize to exact pixels, percentages or social presets.
- Image Converter: Convert JPG, PNG, WEBP, AVIF, BMP, GIF and ICO in bulk.
- Background Remover: Remove image backgrounds with on-device AI. Replace with color or blur.