Compress Image to a Target Size (KB)
Compress a photo to a specific target size in KB β the tool searches for the highest JPEG quality that fits, and scales down only if it must β all in your browser.
FreeNo sign-upPrivate β runs in your browser, nothing is uploaded
Drop an image here, paste from clipboard, or browse
JPG, PNG, WebP⦠· processed in your browser, never uploaded
Compresses to JPEG, searching for the highest quality that fits your target size (and scaling down only if needed). Runs entirely in your browser β your image is never uploaded.
Quick answer
To compress an image to a target size, upload it and enter the size you need in KB (for example 100). The tool automatically searches for the highest JPEG quality that fits under your target, scaling the dimensions down only if quality alone isn't enough. It reports the final size and the percentage saved, and runs entirely in your browser, so the photo is never uploaded.
Formula & method
The image is re-encoded as JPEG at varying quality levels using a binary search: it repeatedly halves the quality range to find the best quality whose file size stays at or under your target. If even low quality is still too large, it reduces the pixel dimensions step by step and searches again. Transparent areas are flattened to white, since JPEG has no transparency.
Examples
- Input
- Target 100 KB
- Result
- β€ 100 KB JPG
- Why
- Fits under a strict size cap for forms or email.
- Input
- Target 30 KB
- Result
- β€ 30 KB JPG, possibly scaled
- Why
- Tiny targets may also shrink the dimensions.
- Input
- Target 200 KB on a 1 MB photo
- Result
- ~200 KB at high quality
- Why
- A loose target keeps quality high β often 80β90%.
When to use this tool
- Meeting an upload limit on a form, job portal, or government site (e.g. 'max 200 KB').
- Shrinking photos to email or message faster.
- Hitting a specific size budget for a web page.
Common mistakes
- Setting an unrealistically tiny target for a large photo, which forces heavy quality loss and downscaling.
- Expecting a PNG out β the result is a JPEG, because JPEG is what allows precise size control.
- Compressing an already-tiny image, where there's little left to save.
Frequently asked questions
How does it hit an exact KB target?
It binary-searches the JPEG quality to find the highest setting that stays under your target size, and scales the image down only if quality alone can't get there.
Will it always reach my target?
Almost always. If the target is extremely small for the image, it returns the smallest version it can make and tells you so.
What format is the output?
JPEG, because its quality setting allows precise size control. Transparency is flattened to a white background.
Is my image uploaded?
No. All compression happens in your browser; the photo never leaves your device.
Does it reduce the dimensions?
Only if needed. It first lowers quality; it scales the pixel dimensions down just enough to reach very small targets.
How much quality will I lose?
For loose targets, very little (often 80β90% quality). Tight targets require more compression and may visibly soften the image.
Sources & references
External references open in a new tab. We are independent and not affiliated with these organizations.
- β Free to use
- β No sign-up required
- β Runs entirely in your browser β nothing is uploaded.
- β Formula and method shown above
Provided βas isβ for general information only β results may be inaccurate, so verify before you rely on them. No warranty; use at your own risk.
Built and reviewed by HIFreeTools against the formula shown above and any authoritative references cited on this page. See our methodology and editorial standards.
Related tools
- Image CompressorImage
- Image ResizerImage
- PNG to JPG ConverterImage
- JPG to WebP ConverterImage
- Crop ImageImage
- Image FiltersImage
Embed this tool on your site
Free to embed, no sign-up. Paste this code where you want the compress image to kb to appear: