Compress an image to 20 KB, 50 KB, 100 KB or any size
Pick a target size and JPEG or WebP, drop a photo, and download the smallest file that still looks good.
or drop it here. JPEG, PNG or WebP, up to 50 MB.
Waiting for an image. Pick the target first, then the photo; it is compressed on this device.
Runs in your browser. The file is not uploaded, there is no account, and closing the tab discards it.
What this image compressor does
Upload forms often set a limit: a profile picture under 100 KB, a document scan under 200 KB, a passport-style photo under 50 KB. A photo straight from a phone is usually several megabytes. This tool turns that photo into a file that fits a limit you choose, keeping as much detail as the limit allows, and shows you the size and the dimensions before and after.
You choose the target, not a quality number. The tool does the trial and error for you: it encodes the image at different quality settings, measures each result, and keeps the largest one that still fits under the target, because the largest file that fits is the one with the most detail.
How to compress an image to a target size
- Pick the target. Press 20 KB, 50 KB, 100 KB or 200 KB, or press Custom and type any size in KB.
- Pick the format. JPEG works everywhere. WebP gives smaller files at the same quality where it is accepted.
- Choose the image. Press Choose a photo or drop a JPEG, PNG or WebP file on the box. Compression starts at once.
- Compare before and after. The two cards show the file size, the width and height in pixels, and the quality setting that was used.
- Download. Press Download compressed image. The file name ends in
-compressed. - Try other settings if needed. Change the target or the format and press Compress again with these settings; the same photo is used, so there is no need to pick it again.
The common target sizes
Compress an image to 20 KB
20 KB is a very small file: thumbnails, signature images and some government or exam forms ask for it. A phone photo almost never reaches 20 KB at full size, so the tool will also reduce the dimensions, often to a few hundred pixels wide. That is expected; at this size, a small sharp picture looks better than a large blurry one.
Compress an image to 50 KB
50 KB suits profile photos and ID-style pictures. A portrait cropped close to the face compresses well, because skin and plain backgrounds hold little fine detail. Crop first if you can; fewer pixels leave more bytes for the face.
Compress an image to 100 KB
100 KB is a common limit for avatars, forum posts and application forms. A photo at web size usually fits at a good quality as JPEG, and with a little more detail as WebP.
Compress an image to 200 KB
200 KB is enough for a sharp photo at web size, for example a product image or a picture in an email newsletter. A full-resolution phone photo usually still has to get narrower to fit, so check the After card for the new width.
Custom sizes
For limits such as 500 KB, 1 MB (type 1000) or 2 MB (type 2000), use Custom. If the original is already under your target, the tool says so; you can keep using the original.
What compression changes in the file
JPEG and WebP are lossy formats: they save space by discarding detail the eye notices least, such as fine texture and small colour shifts. The quality setting controls how much is discarded. Browsers expose it as a number between 0 and 1 for these two formats, as MDN's toBlob reference describes. The tool searches that number between 0.30 and 0.92. When even 0.30 is too large, it does not go lower, because very low settings produce visible blocks; it shrinks the pixel dimensions instead and searches again.
What you will see in the result:
- File size: at or under the target.
- Dimensions: unchanged unless the target required smaller ones; the After card shows the new width and height.
- Format: JPEG or WebP, whatever you chose, even if the original was a PNG.
- Colours: the browser draws in the sRGB colour space by default, so wide-colour photos can look slightly less saturated.
- Transparency: kept in WebP, filled with white in JPEG.
JPEG or WebP: which format to choose
According to Google's WebP documentation, lossy WebP images are 25-34% smaller than comparable JPEG images at equivalent quality, and lossy WebP also supports transparency. Under a tight limit that difference means more pixels or fewer artefacts. JPEG has one big advantage: every device, app and upload form accepts it. If a form says "JPG or PNG only", use JPEG. If the browser you use cannot write WebP files, the WebP option is turned off and the tool tells you.
PNG is not offered as an output here because it is lossless: a PNG of a photo is usually larger than the original JPEG, and it cannot be squeezed to a target size without reducing the dimensions. To change dimensions directly, use the image resizer.
What happens to metadata
The compressed file is encoded from the pixels drawn on an HTML canvas, and a canvas holds pixels only. So the result carries none of the original's EXIF data: no camera model, no capture date, no GPS position, no embedded thumbnail. That is useful when you compress a photo to post it publicly. If you need to keep the metadata, keep the original as well. To see what a photo contains before you share it, or to remove metadata without compressing, use the photo metadata viewer and remover.
Photos that a phone stored sideways with a rotation flag are drawn upright before compression, so the result shows the right way up without needing the flag.
Private image compression without an upload
Some online compressors process your image on their server. This one does not. The page loads its code once; after that, the image is decoded, redrawn and encoded inside your browser. There is no upload, no account and no file stored anywhere except your own downloads folder. You can confirm it in your browser's developer tools: the Network tab shows no request carrying the image while you compress.
Large photos use a lot of memory while they are decoded. To keep phones from running out, the tool works on at most 16.8 megapixels (4096 x 4096 pixels) and scales larger photos down to that size first, with a note. It accepts files up to 50 MB and frees the memory as soon as you start over.
Tips for the best result
- Crop before you compress. Every pixel you remove leaves more bytes for the rest.
- Compress the original, not a copy that was already compressed. Each round of lossy compression adds artefacts.
- Prefer WebP for small targets where the destination accepts it.
- Check the preview at the size it will be shown. A 20 KB image looks fine as a small avatar and poor as a full-screen photo.
Keeping the originals private in Stash
A compressed copy is for sharing. The full-size originals, especially of documents, IDs and personal photos, are worth keeping somewhere locked. Stash is a vault for photos, videos, files and notes that opens as a working calculator; typing your PIN and pressing = opens the vault. Every item is encrypted on the device with AES-256, there is no account, and vault files stay out of the Photos library and iCloud Photos. Stash runs on iPhone and iPad with iOS 15 or later and is free to download.
FAQ
Are my images uploaded?
No. The image is decoded, redrawn and encoded by your own browser, in the tab you have open. No file is sent to a server, there is no account, and the result exists only in memory until you download it.
How do I compress an image to 100 KB?
Choose 100 KB as the target, pick JPEG, then choose the photo. The tool tries different quality levels until the file is at or under 100,000 bytes and keeps the best-looking version that fits. Press Download compressed image.
Can the tool make an image exactly 50 KB?
It makes the file at most 50 KB, usually a little under, because JPEG and WebP quality changes in steps and every step changes the size. A file just under a limit is accepted by any upload form that sets that limit.
Does compression change the image dimensions?
Only when it has to. The tool first lowers the quality at full size. If even low quality is above the target, it reduces the width and height as well and tells you so. Photos above 16.8 megapixels are scaled down to that size first.
Should I choose JPEG or WebP?
WebP is usually smaller at the same visible quality, so it keeps more detail under a tight limit. Choose JPEG when the place you upload to does not accept WebP; JPEG opens everywhere.
Does compression remove EXIF and GPS data?
Yes. The compressed file is drawn from pixels only, so it carries no camera model, date or GPS location from the original. Photos that were stored sideways are drawn upright first.
What happens to transparent PNG images?
JPEG has no transparency, so transparent areas become white. WebP keeps transparency. Choose WebP for logos or graphics with a see-through background.
Is KB counted as 1,000 or 1,024 bytes?
The tool counts 1 KB as 1,000 bytes. A file that fits 100 KB this way is 100,000 bytes or less, so it also fits a form that counts 1 KB as 1,024 bytes.