Image Compressor
Shrink JPEG, PNG or WebP photos to a target file size, right in your browser.
Private by design: files are processed locally in your browser and never uploaded.
Loading the local file tool. If the controls do not appear, refresh or enable JavaScript.
How to use the image compressor
- Drop your image into the upload box (or tap it to browse). JPEG, PNG and WebP are accepted — the file never leaves your device.
- Set a target size in KB, for example 100 KB. This is a ceiling the tool aims for, not a guaranteed exact size.
- Pick an output format. Only formats your browser can genuinely encode are listed. JPEG suits photos but cannot keep transparency; WebP is small and keeps transparency; PNG is lossless but usually largest.
- If you're converting to JPEG and your image has transparent areas, choose the background colour that replaces them.
- Tick "Also shrink dimensions if the target can't be reached by quality alone" if you want the tool to reduce pixel size as a last resort.
- Press Compress image. The tool tries quality levels from high to low, measuring the actual file size each time, and shows you the real before/after size and dimensions.
What it does — and what it doesn't
It re-encodes your photo at lower quality settings until the file fits under your target, reporting the true final size. It preserves transparency for PNG and WebP output, and applies the correct rotation from your camera's EXIF data so the result is upright.
It does not guarantee an exact KB number — encoding sizes don't shrink evenly, so a photo might land at 96 KB or 88 KB when you asked for 100. It also doesn't improve quality, doesn't claim "no quality loss", and won't reduce dimensions unless you explicitly tick the shrink option. PNG output is always lossless, so very small PNG targets are often impossible.
Formats, limits and browsers
- Inputs: JPEG, PNG, WebP (verified by checking the file's actual bytes, not just its extension).
- Outputs: JPEG, WebP, PNG — but only those your browser can really encode.
- Limits: files up to 80 MB and 144 megapixels; target between 1 and 80,000 KB. KB here means 1,024 bytes, as the tool counts it; a portal counting 1,000 bytes per KB will report a slightly larger number.
- Browsers: any recent Chrome, Edge, Firefox or Safari. WebP output needs a browser that can encode WebP (all current ones can); the format list updates automatically if yours can't.
Example workflow
You need to upload a passport-style photo to a portal that caps uploads at 100 KB. Your phone saved it as a 4.2 MB JPEG at 4000 × 3000 px. Set the target to 100 KB, pick JPEG, leave dimensions untouched, and compress. The tool might deliver 94 KB at full resolution — or tell you honestly that quality alone couldn't reach 100 KB, in which case ticking "also shrink dimensions" gets you there by reducing to around 2000 × 1500 px.
Troubleshooting
- "Target could not be reached": the image can't get that small at these settings. Raise the target, allow dimension shrinking, or choose WebP.
- Transparent PNG turned white/black after converting to JPEG: that's the matte colour filling transparency — pick a colour that suits your use before converting.
- File looks blurry: the target forced a very low quality. Accept a bigger target or a larger file; compression can't create detail.
- "Could not recognise as a supported image": the file's bytes don't match JPEG/PNG/WebP (e.g. it's actually HEIC or GIF renamed to .jpg). Convert it to a supported format first — for example, open the photo in your phone's Photos app and export or share it as JPEG, then upload the JPEG here.
Privacy
Everything happens locally in your browser — decoding, re-encoding and measuring. No bytes are uploaded, no account is needed, and nothing is stored on any server. You can verify this with your browser's developer tools: the processing step sends no selected-file upload, though ordinary page assets may still load.
Frequently asked questions
Will the compressed image be exactly the KB I asked for?
Not necessarily. The tool aims for at most your target and always shows the true final size. Exact sizes aren't possible because compression doesn't shrink evenly across images.
Does compressing reduce the photo's dimensions?
Only if you tick "also shrink dimensions". Otherwise the pixel size stays exactly the same and only quality is reduced.
Why is my PNG still huge after compression?
PNG is lossless — quality settings don't shrink it the way they shrink JPEG. For small file sizes, convert to JPEG (photos) or WebP instead.
Why won't my iPhone photo upload?
It is probably a HEIC photo. The tools accept JPEG, PNG and WebP only, and renaming the file does not change its contents. See why HEIC photos won't open for how to get a JPEG copy and how to stop future photos being HEIC.
Is my photo uploaded anywhere?
No. All processing runs on your device in the browser tab. Closing the tab ends the working session. Downloads and backups are not erased.
Related
- Image Resizer — change pixel dimensions first, then compress
- Image Converter — switch between JPEG, PNG and WebP
- Guide: compressing an image to a target KB size
- Guide: why compressed images look blurry
- File size, dimensions and quality — which number is actually causing the problem