Image compressor

Open a JPEG or a WebP, drag the quality control, and read the size of the file your browser has just encoded: a measured byte count, not a guess built on averages. The whole rewrite happens inside this tab, the photo is uploaded nowhere, and the tool keeps working if the network drops after the page has loaded.

Pick images, or drop the files here.

Each file gets its own controls. Nothing leaves this browser.

Quality is the lever that genuinely shrinks a file, and it only exists in the lossy formats. JPEG and WebP obey the number you set and hand back something smaller in a way you can search for: type a target in kB and the page tries up to six qualities and tells you which one fitted. PNG sits outside that search for a measured reason rather than caution — it ignores the quality parameter.

Then there is the case every online compressor hides: re-encoding a PNG can make it bigger. In our measurements a 71,516-byte PNG came back as 111,276 (56% larger) and a 4,783-byte one came back as 9,150 (91% larger). Whenever the output is not smaller than the input, this page writes “no reduction” with both numbers on the screen instead of offering the file as a win.

There is no AVIF here either, and that is measured too: asked for image/avif, the canvas returned a file whose declared type is image/png, on both engines we tested, at every quality and for every file. Shipping a PNG dressed up as AVIF is worse than not offering the option, so it does not appear in the selector.

How to use

  1. Pick your images, or drop the files on the marked area. Every file gets its own card, holding the name, the dimensions and the input size.
  2. Choose the format on that card. The selector only lists what your browser really encodes: the page works that out once when it opens, by looking at the type of file the encoder hands back and not at the name of the browser.
  3. Drag the quality slider. The number beside it is the size of the file encoded just now, measured in bytes, and the shrink against the original is written next to it because that shrink is real.
  4. Or type a target in the Target in kB field and press Find quality. The search tests at most six qualities; if none of them reaches the target, the card reports the smallest size it managed rather than pretending the target fitted.
  5. Download each file from the button on its own card — there is no zip, because bundling several files is not this page’s job. Clearing the list returns everything to the starting state, with nothing kept behind.

What each format does when you touch quality

Quality in a lossy format decides how much fine detail gets thrown away, and the size follows that number downwards in an orderly way. That ordered curve is what makes a search possible: the page encodes at two points on the scale, sees which side of the target each one fell on, and halves the interval, spending at most six encodings. If your file does not fit between 0.30 and 0.95, no quality will fix it — a smaller image or another format will.

PNG is the opposite: there is no quality to negotiate. The file already arrives losslessly compressed, and packing the same pixels again with different filter decisions can cost more bytes than it saves. That is exactly what we measured: 71,516 → 111,276, and 4,783 → 9,150. A PNG that has to weigh less gets converted (WebP takes a quality setting) or resampled to fewer pixels, not squeezed with a control the browser ignores.

Every image here passes through a canvas, and a canvas has a pixel ceiling: 16,777,216 of them, which is 4096 × 4096. On both engines we measured, a 4096 × 4096 surface encodes while an 8192 × 8192 one, 67 megapixels, returns no file at all. Above the ceiling the page scales the dimensions down, keeps the ratio, and writes the new measurements on the card together with the reason, which is that browser limit rather than a saving the page chose.

We also measured that encoding can simply stop answering: on a very large canvas the file request hung without calling its completion callback, and only came back once a four-second deadline ended the wait. Every encode on this page carries that deadline, and when it runs out the card says the browser returned no file instead of spinning forever.

Lastly, the byte count belongs to the browser that produced it. The same photo at the same quality of 0.5 came out at 61,774 bytes on one engine and 62,054 on the other, half a percentage point apart. The number on your screen describes your session, and another browser may land a little away from it.

FormatDoes quality change anything?What happens here
JPEGYes, from 0.30 to 0.95Fine detail drops as quality drops, and a transparent background is painted white. On the photo we measured, 0.7 turned 90,927 bytes into 38,211.
WebPYes, from 0.30 to 0.95The same negotiation as JPEG and usually below it: on that same file, 0.7 gave 16,230 bytes against the 38,211 of the JPEG.
PNGNo, the parameter is ignoredIt opens without trouble, but re-emitting usually grows: we measured 71,516 → 111,276 (+56%). To make it lighter, convert to WebP or reduce the dimensions.
AVIFNot offeredAsked for image/avif, both engines returned a file typed image/png, at every quality. Downloading that as an AVIF would be a lie printed on the button.
GIFNot offeredThe image is repainted frame by frame by the canvas, so an animated GIF would arrive as a single frame and without its pauses.

Frequently asked

Why did my PNG get bigger?
Because PNG has no quality control: the number you drag is ignored, and the browser repacks the same pixels with different filter decisions, which can cost more than the original did. Our measurements included a 71,516-byte PNG that returned 111,276 and a 4,783-byte one that returned 9,150. To shrink a PNG, convert it to WebP or lower the dimensions, and when the output is not smaller this page says so in words instead of hiding the figure.
Is my image uploaded to any server?
No. The page opens no connection once it has loaded: decoding, rescaling and encoding all happen in your browser’s memory, and the download button hands back a file that never left this machine. Nothing stays in history, in local storage or in a processing queue — closing the tab discards the whole list, and the network panel of your browser shows no request leaving while you work.
Why is there no AVIF if my browser says it supports it?
Because knowing how to open AVIF is not knowing how to create it, and what we measured was creation: asked for image/avif, both engines we tested returned a file whose declared type is image/png, at every quality and for every file. The only honest test is to look at what comes out, so this page offers only the formats that return intact — JPEG and WebP. An AVIF that is a PNG inside is not an AVIF anywhere.
What happened to the EXIF data of my photo?
It is gone, and that is the consequence of rewriting an image through a canvas. Camera model, capture date, GPS position and colour profile are metadata rather than visible pixels, so the new copy does not carry them. Orientation is the exception, because it is applied while reading: a photo your phone stored sideways comes out upright, and the flag that used to announce the rotation stops existing. Keep the input file if you need the metadata, and if what it held was where you were standing, losing it here is the expected behaviour.
Why was my image resized on its own?
Because a browser cannot encode a surface above a certain size, and the ceiling used here is 16,777,216 pixels, which is 4096 × 4096. On both engines we measured, that size encodes and 8192 × 8192 (67 megapixels) returns nothing. Above the ceiling the page scales down, keeps the ratio, and writes the new dimensions plus the reason on the card. A picture of 1366 × 768, for one, stays exactly as it arrived.
Is the target size always reached?
No, and the page says so when it misses. The search starts at 0.95 and walks down to 0.30 spending at most six encodings; if the file is still above the target at the lowest quality, the card shows the smallest size it managed and the slider sits on that floor. A large image with a small target is answered with fewer pixels, not with one more attempt.

Related tools