Compress images
Drop in your images, choose a quality, and each row shows the size your browser actually produced. Nothing is uploaded.
Compressed images appear here.
How to use it#
- Drop your images onto the box above, or click it to pick them.
- Pick an output format, or leave it matching whatever you dropped in.
- Move the quality slider until the sizes in the rows look right. For a PNG it sets how many colours the file keeps.
- Download the files you want, or take the whole batch.
The size you see is the size you get#
Every number in a row comes from a file your browser has already written. There is no prediction from the dimensions and no rule of thumb, because how well an image compresses depends on what is in it. A photograph of a blank wall and a photograph of a forest at the same resolution can differ by a factor of five.
That matters because the decision you are making is almost always about a limit: an upload form that stops at 2 MB, a mail server that bounces at 10, a page you want to load quickly. Moving the slider changes the numbers in front of you, so you can stop at the first setting that clears the limit instead of guessing and re-checking.
Which format to compress into#
Leaving the format matching the input is the safe choice: a JPG stays a JPG and a PNG stays a PNG, so nothing downstream has to change. It is also the weakest option, because the format an image arrived in is often not the best one for it.
A PNG is lossless, so writing the same pixels out again saves little. This tool shrinks a PNG another way: it gives the image a palette of at most 256 colours and stores each pixel as a pointer into it. A logo, an icon, or a screenshot usually looks the same afterwards, and it stays a PNG with its transparency, so nothing that uses it has to change.
For photographs, WebP still wins by a wide margin. In testing, a detailed 1600 pixel image went from 3.0 MB to 790 KB as a 256 colour PNG and to 94 KB as WebP at 80%. A flat app icon on a transparent background went the other way: 160 KB became 59 KB as a PNG, with every colour kept, and 105 KB as WebP. JPG is the right answer when the file is going somewhere old or fussy, and it fills any see-through parts with white.
What fewer colours cost a PNG#
For a PNG, the slider sets how many colours the file keeps, and the caption above it gives the number. From the starting 80% up, that is 256, the most a palette can hold. An image that already has fewer colours is stored exactly, the row says all of them were kept, and nothing is lost. Each step below 80% takes away just under a third of the colours, down to 8 at the bottom.
Fewer colours show first in smooth gradients, such as a sky, a shadow, or a soft glow, which break into visible bands. The tool does not scatter dots to hide them, because that dithering makes the file bigger and roughens the flat areas palette PNGs are best at. If bands show even at 256 colours, it behaves like a photograph, and WebP or JPG will serve it better.
At 100% no colours are merged. An image with 256 colours or fewer is still stored as a palette, and one with more is written in full colour, which is rarely smaller than the file you started with.
Where the quality goes#
Lossy compression works by discarding detail the eye is bad at noticing: fine gradients, subtle colour shifts, the exact edges of things. At high settings that is genuinely invisible. As you push down, smooth areas like skies and skin start to band, and hard edges pick up a faint halo.
Screenshots and images with small text fall apart much sooner than photographs, because text is nothing but hard edges. If a row looks wrong at 60%, it is usually worth trying WebP at 80% rather than JPG at 80%.
Compressing something twice#
A JPG downloaded from a website has already been compressed, often more than once. Running it through again removes a little more detail and cannot bring back what the earlier pass took, so the result is always slightly worse than compressing the original would have been.
If you still have the file the camera or the design tool produced, start from that. If you do not, a single careful pass here is still far better than repeatedly saving at a low setting.
Frequently asked questions#
Are my images uploaded anywhere?
#
No. Your browser decodes and re-encodes each file on your own device, so the images never travel. The page keeps working with the network switched off, which is the plainest proof of it.
What does Match the input do?
#
It writes each file back out in the format it arrived in, so a JPG stays a JPG. Browsers can read AVIF but cannot write it, so an AVIF is saved as WebP instead, which keeps both the small file size and any transparency.
What quality should I use?
#
Around 80% suits most photographs and is the default. Go higher for screenshots and anything containing small text, where compression shows up around letter edges first. Below about 60% the loss becomes visible on almost any image. For a PNG the slider sets its colours instead: 80% and above keeps a full palette of 256, and lower settings trade colours for size, which shows first as bands in smooth gradients.
Why did one of my files get bigger?
#
Some images are already compressed harder than the settings you chose, and a few, such as flat graphics forced into JPG, simply do not suit the format. A PNG at 100% can grow too, because keeping every colour of an image with more than 256 of them means writing it in full colour. The row says so rather than hiding it, and the original is still on your machine untouched.
Does a compressed PNG keep its transparency?
#
Yes. The palette stores opacity as well as colour, so see-through and partly see-through pixels survive, including the soft edge around a logo. When the palette is chosen, each colour counts by how much of it shows, so the entries go to the colours you can actually see.
Does compressing remove EXIF data?
#
Yes. Every file is written fresh from its pixels, so the one you download carries no camera model, timestamp, or GPS coordinates. That is useful before posting a photo publicly, and worth knowing if you needed that data kept.
Can I compress several images at once?
#
Yes. Drop in a whole folder and the format and quality apply to every file. PNG, JPG, WebP, and AVIF can share one batch, each row shows its own before and after, and Download all saves the lot. Each file is saved with -compressed on the end of its name, so it never replaces the original in your downloads.
Can I compress an image to an exact size, such as 100 KB?
#
Not by typing the size here, though the rows show you when you are under it. For a hard limit from an upload form, use compress image to size: type 100 KB, or 20 KB, or whatever the form allows, and it finds the highest quality that fits.
Can I make the image smaller in pixels too?
#
Not here. This tool changes how hard the image is compressed and leaves the dimensions alone. The image resizer handles pixel dimensions, including fitting an image under a specific file size.