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.
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.
FreeNo sign-upPrivate — runs in your browser, nothing is 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.
How it works
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
Example 1: Email attachment limit
- Input
- Target 100 KB
- Result
- ≤ 100 KB JPG
- Why
- Fits under a strict size cap for forms or email.
Example 2: Small thumbnail
- Input
- Target 30 KB
- Result
- ≤ 30 KB JPG, possibly scaled
- Why
- Tiny targets may also shrink the dimensions.
Example 3: Modest squeeze
- Input
- Target 200 KB on a 1 MB photo
- Result
- ≤ 200 KB, higher quality
- Why
- A looser target lets the tool keep a higher quality setting.
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 reach my 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; for very small targets it scales the pixel dimensions down in steps until one fits.
How much quality will I lose?
For loose targets, very little — the tool keeps the highest quality that fits. 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
- No sign-up
- 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 below.
Related tools
Embed this tool on your site
Free to embed, no sign-up. Paste this code where you want the tool to appear: