Does Compressing an Image Reduce Quality?

Does compressing an image reduce quality? Only when the compression is lossy. Lossless formats lose nothing, and lossy loss is often invisible at quality 80.

By Mike Wiberg · · 13 min read

Compressing an image reduces quality only when the compression is lossy, and even then only past the point your eyes can catch. Lossless compression, the kind PNG always uses, rebuilds every pixel exactly and throws nothing away. Lossy compression, the kind JPEG always uses, discards data on purpose, though at a high setting the loss is invisible.

I build the compressor behind this site, so I watch the byte counts on both sides of this exact question. For the fuller map of every lossless and near-lossless route, see the reduce image size without losing quality guide. This page stays narrow, on the mechanism itself, and it proves the point with a measured before and after from the real tool rather than asking you to take a number on faith.

Does compressing an image reduce quality?

It depends entirely on the type of compression, so the honest answer is "only sometimes, and by an amount you control." There are two kinds, and they behave in opposite ways. Lossless compression stores the same pixels in fewer bytes and reconstructs them perfectly, so it never costs you any visible detail (Wikipedia, lossless compression). Lossy compression reaches much smaller files by discarding data your eye is unlikely to miss, and that discarded data is gone for good (Wikipedia, lossy compression).

So does compression reduce image quality? Only when it is lossy, and even lossy compression at a sane setting produces a file that looks identical to the original at normal viewing size. The trap is not compression itself. It is using a lossy format on the wrong content, pushing the quality setting too low, or re-saving the same lossy file over and over. The rest of this page walks each of those, with the numbers.

What does compression actually do to your file?

Compression shrinks the number of bytes a picture takes up on disk, and that is a separate thing from the number of pixels the picture has. This is the single biggest source of confusion around the question. A photo that is 4000 pixels wide stays 4000 pixels wide after compression. What changes is how many bytes are needed to describe those pixels.

Two different levers get called "making the image smaller," and mixing them up leads to the wrong fix. Reducing the file size is compression: same dimensions, fewer bytes. Reducing the dimensions is resizing: fewer pixels, which also cuts bytes but changes how large the image can display cleanly. If your goal is a smaller file for an upload form, compression usually gets you there without touching the pixel dimensions at all. If your goal is a smaller display size, that is resizing, and it is a different operation covered in the reduce image size without losing quality guide.

File size is not the same as dimensions

You can have a 200 KB image at 4000 pixels wide and a 2 MB image at the same 4000 pixels wide. The difference is how hard the file was compressed, not how big the picture is. Keep the two ideas separate and most "did compressing ruin my photo" questions answer themselves: a compressed file at the same dimensions holds the same picture, only encoded more efficiently or, in lossy mode, with some detail traded away.

Does lossless compression reduce quality?

No, never, by definition. Lossless compression records the same pixels in fewer bytes, then reconstructs a bit for bit match of the original when the file is opened. The format specification promises exactly this: the original data can be perfectly reconstructed with no loss of information (Wikipedia, lossless compression). Run a file through a true lossless pass and the pixels you get back are the pixels you started with, in a smaller file.

How perfect reconstruction works

Lossless encoders shrink a file by removing statistical redundancy rather than detail. Instead of spelling out every pixel value in full, the encoder stores each pixel as a small difference from its neighbors and gives short codes to the values that show up most often. Nothing is thrown away, so decoding is exact. That is why you can decode and re-encode a lossless file any number of times and never lose a thing.

Which formats are always lossless

PNG is always lossless, and no lossy PNG mode exists. GIF is lossless too, inside the small fixed color palette it was built around. If a PNG ever looks worse after you compressed it, the pixels were changed somewhere else in the pipeline, because the PNG compression step itself cannot degrade them.

How much smaller do you get, and what do you lose?

A typical phone photo comes back 60 to 80 percent smaller at the default quality 80, with nothing visibly different at normal size. Here is a measured run from the compressor on this site: the same 4.5 MB phone photo saved at quality 80 and at quality 60, same source file, real output sizes. This is the measurement the top search results describe but never show.

Setting Output size Smaller than original
Original JPEG 4.5 MB baseline
Quality 80 0.9 MB 80 percent smaller
Quality 60 0.47 MB 90 percent smaller
4.5 MB phone photo, compressed output size by quality setting, same source file Original 4.5 MB Quality 80 0.9 MB Quality 60 0.47 MB Measured with imagecompressor.tools, 2026-07-15. Bar length proportional to bytes.

At quality 80, the file is a fifth of its original size and looks the same on screen. Drop to quality 60 and it is a tenth of the original, with faint softening you can start to find if you zoom in on a smooth sky. That is the whole trade in one table: the further you push the setting down, the more bytes you save and the more detail you spend. The demo on the tool itself shows the same effect with a format change, taking a 497 KB JPG down to a 214 KB WebP at quality 80, 56.9 percent smaller, same picture on screen.

Which formats are lossy, and which are lossless?

PNG and GIF are always lossless, JPEG is always lossy, and WebP, AVIF, and TIFF can go either way depending on how they were saved. The file extension alone does not tell you which mode a file used, which is where most of the confusion starts.

Format Compression Ever reduces quality?
PNG Always lossless No
GIF Always lossless, fixed palette No, apart from the color limit
JPEG Always lossy Yes, by the quality setting
WebP Lossy or lossless Only in lossy mode
AVIF Lossy or lossless Only in lossy mode
TIFF Usually lossless Rarely, and opt-in

On this site, WebP and AVIF output uses the same lossy, quality-80 default as JPEG, because that is the setting that gets a photograph small with no visible cost, not because those formats cannot go lossless. WebP typically lands 25 to 35 percent smaller than a JPEG of the same visual quality, and AVIF often reaches about 50 percent smaller, at the cost of slower encoding.

What "visually lossless" means

Push a lossy setting high enough and the result becomes what compression research calls visually lossless: different from the original at the bit level, yet indistinguishable from it at the pixel level your eye resolves (Wikipedia, image compression). Ideally a lossy file is transparent, meaning the retrieved image can be quite different from the original in the data while looking the same to the eye for practical purposes (Wikipedia, lossy compression). Quality 80 on a photograph is squarely in that zone, which is why it is the default here.

Compression artifacts and color banding

Push the setting low instead and the cost shows up directly. You get blocky patches called compression artifacts, and banding across smooth gradients like skies and shadows, where a continuous color ramp gets stepped into visible bands (Cloudinary, how lossy compression works). These are the visible symptoms people usually mean when they say compression ruined a photo. They come from an aggressive setting, not from compression as a category.

What happens if you keep compressing an image?

It gets worse each time, because lossy compression is destructive on every pass, not only the first. Save a lossy file once and you lose whatever the quality setting discarded, a single bounded hit. Save that already-lossy file again and each pass throws away more, because the encoder is now working from data that already has pieces missing and cannot tell your original detail from its own earlier rounding.

Generation loss, pass by pass

This compounding is called generation loss: repeatedly compressing and decompressing a lossy file makes it progressively lose quality (Wikipedia, lossy compression). Lossless compression has no equivalent, because nothing was ever discarded to begin with. A screenshot re-saved as JPEG five times looks visibly softer than the same image exported once from an unedited original at an identical quality setting, since the fifth save is compressing damage the fourth save already introduced.

The fix is to keep one untouched master and export fresh compressed copies from it, rather than re-saving the same compressed file. Basing new copies on a lossy source only stacks fresh artifacts on top of old ones (Wikipedia, lossy compression).

When is lossy compression the wrong choice?

When the content is sharp-edged rather than photographic. Lossy compression is built for the tiny, irregular pixel to pixel variation a camera sensor produces. Text, line art, charts, and flat-color logos have almost none of that noise, so the same algorithm smears their clean edges into visible fuzz and ringing. Applying lossy compression to content that needs sharpness, like diagrams or charts, tends to produce unsatisfactory results, while photographs typically fare well (MDN, choosing an image format).

Content Use Why
Photographs Lossy at quality 80 Sensor noise hides the loss
Screenshots, charts Lossless PNG Sharp edges show artifacts
Logos, line art Lossless PNG Flat color bands under lossy
Archival master Lossless Preserve every pixel for later edits

The second common failure is stacking, covered above as generation loss. A single pass at a sane setting is not where visible damage comes from. Repeated re-saves, or a needlessly low setting chosen to hit a tiny file-size target, are the actual sources almost every time.

How do you compress without losing quality?

Pick a lossless format when the source demands it, otherwise use a lossy format at a setting high enough to stay visually lossless, and touch the file once. For a screenshot, chart, or logo, stay in PNG and skip the quality question, since lossless is both the safe and the space-efficient choice for flat-color content. For a photograph, quality 80 is the number to start from, the same default this site's compressor ships with, because a phone photo comes back 60 to 80 percent smaller at that setting with nothing visibly different at normal size.

If a hard target size forces you lower, drop the setting gradually and check the result by eye rather than guessing. And keep the original: every fresh export from an untouched master avoids generation loss entirely, which is the cheapest quality insurance there is.

Questions

Can I compress an image without losing quality?

Yes, in two ways. Use a lossless format like PNG and you lose nothing at all, because every pixel is reconstructed exactly. Or use a lossy format at a high setting such as quality 80, where the loss is real at the bit level but invisible to your eye at normal viewing size. For photographs the second route is usually the right call, since it saves far more space.

Does compressing a PNG reduce its quality?

No. PNG compression is always lossless, so a compressed PNG decodes to the exact same pixels as the original every time. The file gets smaller because PNG repacks the same pixel data more efficiently, not because it discards anything. If a PNG looks worse afterward, the pixels were changed somewhere else, not by the compression step itself.

Does compressing a JPEG always reduce quality?

Technically yes, since JPEG is always lossy and every save discards some data. Practically, at a high setting like quality 80, the loss is invisible at normal size, which makes "visually lossless" a more useful frame than a strict yes or no. The damage people notice comes from low settings or repeated re-saving, not from a single sane pass.

Can I undo the quality loss from lossy compression?

No. Once lossy compression discards data, it is gone, and no later step, including converting the file to a lossless format, brings it back. A JPEG converted to PNG afterward just preserves the existing damage in a larger file. The only real fix is re-exporting a fresh copy from an untouched original.

Is it worth compressing photos?

Almost always, yes. A phone photo is four to six megabytes and will not fit most upload forms, yet quality 80 brings it back 60 to 80 percent smaller with no visible change. The one time to skip lossy compression is sharp-edged content like text or logos, which belong in a lossless format instead. The short version holds for every format on this site: lossless never costs you a pixel, and lossy costs you exactly what the quality setting says and nothing more. [Compress a photo in your browser](/) and compare the before and after yourself rather than trusting any number, including this page's.