Skip to content
Pixgrain

Compress JPG

Re-compresses JPG photos to a quality you pick, or searches for the highest quality that fits a file size you name.

How JPG compression works

JPEG compression works by discarding detail your eye is unlikely to notice, and the quality setting controls how aggressively it does so. Re-compressing an existing JPG means doing that a second time, on data that has already been through it once — so the question is not whether quality drops, but whether the drop is visible.

At quality 75 to 85 on a photograph it is not. Below 70, the 8×8 block structure JPEG works in starts to show in skies, skin tones and other smooth gradients, and once it appears it cannot be removed.

The more useful mode here is the second one: name a file size, and the tool searches for the highest quality that fits under it. That is a question a quality slider genuinely cannot answer, because the relationship between quality and bytes depends entirely on the image — a busy landscape and a plain studio portrait at the same quality can differ threefold in size. The search runs a handful of real encodes and converges to within about two quality points.

If the target cannot be met even at the lowest quality, the tool says so plainly rather than silently handing back a file that is still too big.

What to expect

A photo straight from a phone or camera is usually saved at quality 90 or above, which leaves plenty of room: re-compressing at 80 typically halves the file with no visible change. A photo that has already been through a messaging app or a website is usually near 70 already, and squeezing it further will show.

If the image needs to be much smaller than compression alone can achieve, resize it. Halving the dimensions cuts the pixel count to a quarter, which does far more than any quality setting and does it without artefacts.

When compressing JPG is the wrong move

Do not re-compress an image you will edit again. Every save degrades it further, and the damage accumulates across rounds. Work from the original and compress once at the end.

Do not compress screenshots or images containing text. JPEG smears colour edges, which is exactly what text is made of. Those should be PNG, and compressing them as JPEG makes them both worse and often larger.

Do not use this to hit a small target on a large image. Compression alone cannot take a 12-megapixel photo to 100 KB without visible damage — resize first, then compress.

Frequently asked questions

Does re-compressing a JPG make it worse?

Yes, though usually invisibly. The image has already been through lossy compression once, and this is a second pass on top of it. At quality 80 and above the difference is not visible at normal viewing distance; below 70 it becomes noticeable in gradients.

How does the "hit a file size" mode work?

It binary-searches the quality parameter: encode, measure, adjust, repeat. Six probes narrow the 1–100 range to within about two quality points. That is more accurate than guessing, because the bytes a given quality produces depend entirely on the image content.

What if the target size cannot be reached?

The tool tells you. It returns the smallest file it can produce and says plainly that the target was missed, rather than quietly handing back something over the limit. Usually the answer at that point is to resize the image rather than compress it harder.

Is the metadata kept?

EXIF is preserved by default, so camera settings, dates and GPS coordinates survive. If you are about to publish the photo, be aware that the GPS tag records where it was taken to within a few metres.