Compress an image
Re-encode an image at a quality you choose. The result panel reports exactly what it cost in bytes.
How it works
Compression comes in two kinds, and the difference decides what you can expect. The lossy encoders (JPEG, WEBP and AVIF) throw information away permanently. They convert the picture from RGB into a brightness channel plus two colour channels, then usually store the colour channels at half resolution in each direction, because human vision resolves colour far more coarsely than brightness; that step alone discards three quarters of the colour samples and is called chroma subsampling.
What quantisation throws away
What remains is cut into small blocks, transformed into frequency coefficients by a discrete cosine transform, and each coefficient is divided by a number from a quantisation table and rounded. Fine texture, film grain and the exact shape of a sharp edge live in the high-frequency coefficients, which get the coarsest divisors and are the first thing to round to zero. So a heavily compressed photo keeps its overall shape while grass, hair, skin pores and text edges turn mushy, and the artefacts appear in 8×8 or 16×16 blocks.
Each re-save adds error
Because the discarded detail is gone, compression is not repeatable without cost. Each time a JPEG is opened and saved again it is dequantised into slightly different pixel values, re-transformed and re-quantised, so a new layer of error is added on top of the old one. This is generation loss, and it is the single most common way images get quietly ruined: a photo mailed through three tools, each saving at a default quality, is measurably worse than the same photo compressed once, hard.
The practical consequence deserves stating plainly: compressing an already-compressed file can make it larger. Re-encoding a JPEG that was saved at quality 60 using quality 78 here produces a bigger file that also looks worse, because the encoder is now faithfully preserving the previous encoder's blocking artefacts. The result panel reports the byte delta either way. If it shows an increase, keep the original — that is the correct outcome, not a failure of the tool.
PNG has no quality knob
PNG is different in kind. Its compression is lossless: filtering followed by DEFLATE, entirely reversible, so the decoded pixels are bit-for-bit the ones that went in. There is therefore no quality knob to turn, and the quality slider is ignored when PNG is selected. Nothing about a PNG can be traded for size except how long the encoder spends searching. The effort setting controls that search.
A lossless recompression pass (oxipng) tries different filter strategies and bit depths and keeps the smallest valid file. Higher effort costs seconds and returns a few more percent; it never costs image quality. PNG wins on flat graphics, screenshots, diagrams, line art and anything with large areas of identical colour, where its filters find long runs to compress and a lossy encoder would instead spray ringing around every hard edge. On a photograph PNG is typically five to ten times larger than a good JPEG.
Smaller formats versus universal reach
For photographic content WEBP's lossy mode is normally 25–35% smaller than JPEG at a visually comparable setting, and AVIF smaller again at the cost of a much slower encode; both also support an 8-bit alpha channel, which JPEG does not. The reason to still choose JPEG is reach: it is readable by every piece of software written in the last thirty years, including print workflows and older desktop tools that WEBP breaks.
Everything here runs as WebAssembly builds of mozjpeg, libwebp and libpng inside a Web Worker on your own machine. There is no queue, no daily conversion cap, and no size limit beyond your device's memory. Nothing is transmitted, and the tool cannot compress an image it has not been given.
Questions
Is my image uploaded to a server?
No. Open your browser's developer tools, switch to the Network tab, and compress a file. The codec chunks download once, then nothing. There is no upload request, because the encoder runs in this tab. Nothing about your image is sent anywhere.
Why did my file get bigger instead of smaller?
Because it was already compressed at a stronger setting than the one you chose. A JPEG saved at quality 60 re-encoded at quality 78 comes out larger and slightly worse, since the encoder now has to preserve the earlier encoder's artefacts as if they were real detail. Lower the quality until the delta turns negative, or keep the original file. Selecting PNG for a photograph will also reliably produce a much larger file.
Does this change the image dimensions?
No. Compression only re-encodes the pixels that are already there, at the same width and height. Reducing the dimensions is usually a far larger saving than any quality setting, since halving both sides removes three quarters of the pixels. If the image is bigger than it needs to be on screen, resize it first and compress afterwards.
What happens to transparency and animation?
JPEG has no alpha channel, so transparent areas are composited onto white. Choose WEBP or PNG to keep them. Animation is not preserved either: an animated GIF or WEBP is decoded to its first frame and the output is a single still image.