How to Compress JPG Without Losing Quality (The Settings That Matter)

Illustration of a quality gauge with its needle near 85 percent and an eye checking the result

Every guide says "compress your JPGs without losing quality", and every honest engineer winces a little: re-saving a JPG always discards something. The useful question is narrower and more practical - when is what gets discarded genuinely invisible, and which settings keep it that way? This article is the science behind the slider: what the quality number controls, where the eye can and cannot catch it, and how to build a workflow where "lossless enough" is a decision, not a hope. If you want the plain step-by-step instead, start with our how-to on compressing JPG images online; this piece is the why underneath it.

What the quality setting actually controls

A JPG encoder splits your photo into 8x8 pixel blocks and converts each block into frequencies - smooth gradients become a few strong low frequencies, sharp detail becomes weaker high frequencies. The quality setting scales a quantization table that decides how aggressively those high frequencies are rounded away. High quality keeps fine steps; low quality rounds hard, and the discarded detail is gone for good. A second, quieter decision happens alongside: chroma subsampling. Most encoders store color at half resolution (called 4:2:0) because eyes notice brightness detail far more than color detail. That single trick is responsible for much of JPG's efficiency - and for the color bleeding you sometimes see around red text on a colored background.

When the loss is invisible - and when it is not

Loss hides where the image is busy. Hair, foliage, fabric, gravel: high-frequency texture masks quantization so well that quality 80 and quality 95 are indistinguishable in a photograph of them. Loss shows where the image is smooth: skies, skin, studio backdrops. There, aggressive rounding creates visible steps (banding) and faint 8x8 block edges. Two habits keep you honest. First, judge at the size the image will actually be seen - artifacts visible at 200% zoom on a file that displays at half size do not exist for your audience. Second, check one smooth area and one detailed area before you commit a batch; those two samples predict the whole set.

The settings that work, by destination

Dimensions still beat quality as a lever: a photo displayed at 1200 px wide should not ship at 4000 px, whatever the quality setting. Resize first with Resize Image, then compress - the savings multiply instead of competing.

JPG vs WebP at the same visual quality

WebP's encoder predicts each block from its neighbors before storing the difference, a trick borrowed from video compression. At matched visual quality it lands roughly 25-35% smaller than JPG on photographs, which is why converting is often a better "compression" than compressing harder: a JPG squeezed to quality 70 to hit a weight budget usually looks worse than the same photo converted to WebP at quality 82. Convert from the best original you have with JPG to WebP, and keep the master file untouched - conversions are one-way doors you may want to walk back through when formats change again.

Three mistakes that actually cost quality

That is the whole secret: "without losing quality" really means "without losing visible quality, at the size and distance the image will be seen". Choose the setting by destination, work from the best original, compress once at the end - and the loss stays where it belongs: in the file size, not in the picture.

Frequently asked questions

Can a JPG be compressed with literally zero quality loss?

Not by re-encoding: saving a JPG always discards something. Truly lossless options are keeping the file as it is, using a lossless format (PNG or lossless WebP) for graphics, or lossless JPG operations such as some rotations and crops. What good settings achieve is visually lossless - no difference your audience can see at display size.

What is the best JPG quality setting for a website?

For most photographs, 80-85. Heroes and product shots can justify 85-88; thumbnails are fine at 65-75. If the image is still too heavy at those settings, the better fix is usually smaller dimensions or converting to WebP, not pushing quality lower.

Why does my compressed JPG look fine on my phone but bad on my monitor?

A monitor shows the image larger and closer, so banding in skies and gradients becomes visible. Judge quality at the largest size the image will realistically be displayed, and give smooth-gradient images a few extra quality points.

Related tools

Compress JPGReduce Image SizeJPG to WebPResize Image