Skip to the content

Image Compressor

Make JPEG, PNG and WebP files smaller and compare before and after.

JPEG, PNG, WebP, GIF, AVIF, BMP or SVG. The pictures stay on your device.

Save as
Compress to
80
px
Share this tool:TwitterFacebookLinkedInWhatsAppEmail

What the quality number does

JPEG and WebP make a file small by leaving out detail the eye is least likely to miss. The quality number, from 1 to 100, sets how much is left out. It is not a percentage of anything: a photo saved at 80 does not keep 80% of the picture. It usually looks the same as the original in a much smaller file.

For photos, 75 to 85 is where files are small and the loss is hard to see. Below about 60, smooth areas such as sky start to show blocks, and edges get a faint halo. Above 90 the file grows quickly for a difference you won't find without zooming in.

Which number is right depends on the picture, so look at it. Damage that is invisible in a scaled-down preview shows at "Actual size", where one pixel of the picture is one pixel on screen.

Which format for which picture

  • JPEG suits photos and other pictures with soft transitions. It can't be transparent.
  • WebP does the same in less space. Google, which developed it, measured files 25 to 34% smaller than JPEG at the same quality. It can be transparent, and every current browser shows it. Some older programs and upload forms don't accept it.
  • PNG stores every pixel exactly. That is right for screenshots, logos and drawings with flat colors, and wasteful for photos, which come out several times larger than as JPEG.

Why a PNG hardly shrinks here

This tool lowers quality, and PNG has none to lower. Saving one again through the browser gives a file of about the same size, and often a larger one: a PNG that was made with a small set of colors is written back in full color. The way to make it smaller is another format. WebP keeps the transparency, and the tool offers to switch when it sees a PNG.

A screenshot as a low-quality JPEG

JPEG cuts a picture into blocks of 8 × 8 pixels and describes each block as a mix of smooth patterns, dropping the finest ones first. A photo has few hard edges, so little is lost. Text is nothing but hard edges, and what was dropped comes back as gray smudges around every letter. JPEG also usually stores color at half the resolution, which blurs colored text and thin lines. Keep screenshots as PNG, or use WebP when the file has to be small.

Compressing to a file size

With "A file size" selected, the tool gets each picture under your limit and gives up as little as it can on the way. It first looks for the highest quality from 95 down to 50 that fits, halving the range each time, which takes seven attempts at most. If quality 50 is still too big, the picture is made smaller in pixels until it fits at 50, and the quality is then raised again as far as the limit allows. It doesn't go below 50: past that point, fewer pixels at a decent quality look better than a large picture that is falling apart.

A kB is counted as 1,000 bytes, the stricter of its two meanings. A file made for 200 kB is at most 200,000 bytes, so it passes an upload form whichever way the form counts. A picture that is under the limit already is handed back untouched.

Good to know

  • Nothing is uploaded. Your browser does the compressing.
  • A picture that would come out no smaller than it went in is kept as it is, and the list says so. This happens with files that were compressed hard before.
  • Compressing draws the picture anew, which drops what the camera stored with it: date, camera model, GPS position. Every round of JPEG or WebP loses a little more, so start from the original.
  • In Chrome, quality 100 switches WebP to its lossless mode. Nothing is lost then, and the file is much larger than at 99.
  • Safari can't write WebP from a web page. The tool says so when you pick it there.
  • A picture of more than about 16.8 million pixels is too large for a browser to redraw at full size. When compressing to a quality, tick the longest-side limit for those. When compressing to a file size, they are brought down to that many pixels first.
See all 8