What compression does and how the levels differ
Most of a picture's size is detail your eyes cannot tell apart. Compression removes that detail, and a good compressor removes exactly as much as it can without anyone noticing.
- JPG, WebP and AVIF are lossy formats. A quality number decides how much detail is thrown away, but the same number suits different pictures differently: a smooth sky can take a low quality, a pile of leaves needs a high one. This tool tries several qualities on representative parts of each picture, compares every try with the original using a perceptual similarity score (SSIM), and keeps the lowest quality that still scores as well as the level you chose. That is why two pictures at the same level can end up at different qualities.
- PNG is lossless, so it cannot simply discard detail. Instead the tool reduces the picture to a palette of at most 256 well chosen colours and spreads the small colour errors across neighbouring pixels (dithering) so that gradients stay smooth. The palette keeps transparency. Then the file is repacked as tightly as possible with OxiPNG. This is what TinyPNG and pngquant do, and it typically removes most of the file. A picture that already has few colours, such as a plain logo or a flat graphic, is not changed at all: it is only repacked.
- High quality keeps the result very close to the original, even when you zoom in. JPG quality stays between 85 and 95. PNG keeps 256 colours with full dithering.
- Balanced (the default) targets a result that looks the same at normal size. JPG quality moves between 74 and 90 depending on the picture. PNG keeps 256 colours with lighter dithering, which makes smoother files.
- Smallest accepts slightly softer fine detail for the smallest files. JPG quality moves between 62 and 85, and PNG uses up to 192 colours.
In our tests on camera style JPG photos, High quality saved 15 to 55 percent, Balanced 40 to 70 percent and Smallest 60 to 80 percent. Pictures full of fine texture, such as foliage, compress less than smooth ones.
Staying under a file size
Many forms and email systems have a size limit. Switch on Stay under a file size and enter it, from 5 to 50,000 KB. A kilobyte is counted as 1,000 bytes, the smaller way of counting, so the result is under the limit however a form counts, and the list shows sizes the same way.
The tool first tries the level you chose: if that result already fits, it is used. Otherwise it lowers the quality, but only down to a floor where pictures start to look rough (55 for JPG and WebP, 42 for AVIF). If the whole picture fits at that floor it keeps all its pixels and the quality is raised as far as the limit allows. Only when even the floor is too big does it make the picture smaller in pixels, and the note says what size it came out at. For PNG, colours come first: a screenshot or a logo can lose most of its colours and still look right, so those are reduced before any pixels are given up, while a photo keeps most of its colours (96 or more) and is made smaller in pixels instead.
A limit is a best effort: it stays under the number you give, usually within a few percent of it, and the list shows how close each file got. If a picture cannot reach the limit without becoming too small to use, you get the smallest result and a note on that picture says the limit was missed. A tiny limit such as 20 KB always costs pixels: a photo cannot hold much detail in that space.
When a file is left alone or comes back bigger
Compressing a lossy picture again loses a little more detail every time, and the gain gets smaller each time. So the tool checks before it saves a JPG, WebP or AVIF again. It works out what quality the file was saved at from how many bytes it takes for its pixels. If that is already about as low as the level would go, or if saving it again would take off less than 5 percent, you get the file back unchanged and the note under it says why. A JPG that this tool made is recognised from its own quantization tables and left alone at the same level or a gentler one, so compressing the tool's own results again changes nothing. A camera photo or an export at a high quality is above that line and is compressed as usual. To get a smaller file from a picture that came back unchanged, start again from the original with a lower level, or switch on a size limit, which always works toward the limit. For PNG a repack that keeps every colour is taken even for a gain of 1 percent, because nothing is lost.
A picture that stays in its own format does not come back bigger, apart from the rare privacy case in the next paragraph. A conversion to another format can, and the list says so when it happens. HEIC photos are very efficient, so a JPG made from one is usually larger, and an SVG, which is only a few lines of text, becomes a much larger picture when it is turned into pixels. A PNG made from a photo is far larger than a JPG. In each case the note suggests a better choice, such as WebP or AVIF for a HEIC photo.
The other case is privacy. An AVIF cannot be cleaned in place, so if it carries camera details or a location and you asked for them to be removed, the picture is saved again without them, at its full size and at the highest quality that keeps the file smaller than the old one, and the note under it says so. Only an AVIF saved at a very low quality to begin with can fail that; the new file is then a little larger and the note says by how much. Switch on Keep camera details and location and the file is left exactly as it is.
Which format to end up with
- Same keeps every picture in its own format, so nothing stops working where you use it.
- WebP is often smaller than JPG at the same look (in our tests about 4 to 5 percent smaller for two large detailed photos and 20 to 45 percent smaller for small, smooth or graphic pictures), supports transparency and opens in all current browsers. Older programs and some upload forms do not accept it.
- AVIF often makes the smallest files of all (in our tests 12 to 17 percent below JPG on two large detailed photos and 24 to 41 percent below on smaller ones), but it takes longer to make and is not understood everywhere yet. It stores transparency with a little loss: soft edges can change slightly, so use WebP or PNG when exact transparency matters.
- JPG works everywhere but cannot be transparent: see-through areas are filled with a colour you choose.
- PNG keeps transparency and sharp edges. It is the right choice for screenshots, logos and graphics, and a poor choice for photos.
What is kept, what is removed and what it cannot do
By default the camera details, date and GPS location stored in a photo are removed, which also makes the file a little smaller and is useful before you share it. A picture that is returned unchanged has them cut out of the file itself where that is possible (JPG, PNG and WebP), so its pixels stay exactly as they were. Switch on Keep camera details and location to copy them into JPG, PNG and WebP results. Compressed pictures have their colours converted to sRGB, and photos that were stored sideways are turned the right way up. A picture that is left as it is keeps its colour profile and its own name.
Animated GIF, WebP, PNG and AVIF files and TIFF files with several pages are left exactly as they are, with the hidden data cut out of WebP and PNG files when you asked for that. Compressing them would keep only the first frame or page, and the tool does not turn an animation into a still picture. It also does not compress video, RAW camera files or PDFs: for PDFs use Compress PDF, and to change the pixel size alone use Resize Image. It cannot recover detail that a picture has already lost, and when a limit is too small for any useful picture it tells you. Pictures of more than 100 megapixels are refused with a message.