FileFits
5 min

Does compressing a file reduce quality?

Two very different operations are both called compression. One cannot lose anything; the other loses something every time. Which one you are running decides what you are risking — and why zipping a folder of photos saves nothing.

"Compression" is used for two operations that have almost nothing in common, and the confusion between them is why this question has no single answer. One of them cannot lose anything. The other loses something every single time. Knowing which one you are about to run tells you exactly what you are risking.

Lossless compression: nothing is lost, and often nothing is gained

Lossless compression rewrites the data so it takes fewer bytes, and can rebuild the original byte for byte. ZIP does this. PNG does this. So does a well-made PDF re-save that renumbers and de-duplicates objects, drops unused fonts and rewrites the cross-reference table.

Because it is reversible, it cannot reduce quality. What it can do is reduce nothing at all. Put a folder of JPEGs into a ZIP and watch the archive come out roughly the same size as the photos — JPEG has already squeezed out the redundancy that ZIP looks for. The same is true of MP3s, MP4s and most PDFs that are mainly scanned images. If someone tells you to "just zip it" to get under an email limit and the zip comes back 2% smaller, this is why.

Lossy compression: quality is the dial you are turning

JPEG, MP3 and AAC are lossy. They throw away detail the eye or ear is least likely to miss, and the discarded detail is gone. JPEG works on 8 × 8 pixel blocks, keeps the coarse tones and discards fine variation, and usually stores colour at half resolution because human vision is worse at colour edges than at brightness edges.

So yes — compressing a photo reduces quality, by definition. The useful question is how much, and where it shows. Flat areas like skies and skin survive well. Sharp edges, text in a screenshot, and fine textures like hair or foliage are where it becomes visible first, as soft haloes around edges and faint blockiness in gradients.

The trap: re-compressing the same file over and over

Each lossy save starts from the already-damaged version, not from the original. Save a JPEG, open it, save it again at the same quality setting, and you have compressed the compression artefacts. Do it a dozen times and the picture visibly degrades even though the quality number never changed. This is generation loss, and it is the single most common cause of "why does my photo look worse and I did not do anything".

The practical rule is to keep an original and always compress from it, never from the last output. If you need three different sizes, make all three from the same source file.

PDFs are the interesting case, because both kinds apply

A PDF can usually be made smaller two ways. The structural re-save is lossless: it reorganises the file without touching page content, and text stays text. Image recompression and rasterising are lossy: the pages get turned into pictures, and the text layer disappears.

That difference matters far beyond how it looks. A rasterised PDF is no longer searchable, cannot be copied from, and cannot be read by an applicant tracking system — which is why compressing a CV until it fits a 2 MB portal limit can quietly destroy the thing the portal is going to parse. Our PDF compressor tries the structural re-save first and only rasterises if that misses the target, and it tells you which one it ended up doing. If it says it rasterised, open the result and try to select a line of text. If you cannot, you have a picture of a document.

How to lose the least

When a form demands a byte budget, there are two ways to reach it: crush the quality of a large image, or reduce the pixel dimensions and keep the quality high. The second almost always looks better. A 4000-pixel-wide photo saved at quality 0.15 to hit 100 KB looks destroyed; the same photo at 1200 pixels and quality 0.8 hits the same 100 KB and looks clean.

That is how the image size targets here work. The encoder binary-searches the quality setting, and when it finds a fit at a poor quality it keeps shrinking the canvas instead, until the quality clears a floor. The result is the largest image that still looks right at that budget, rather than the first thing that happened to fit.

When compressing makes the file bigger

It happens, and it is not a bug. Re-encoding a file that is already smaller than your target can add bytes — a 2.8 MB photo asked to fit a 20 MB mail limit gets re-saved at a high quality setting and can come out larger than it went in. The tools here short-circuit that case and hand back the untouched original instead, because a bigger, twice-compressed file is strictly worse than the one you started with.

The same effect explains something people report as a fault: converting HEIC to JPG usually produces a bigger file. HEIC is simply a more efficient codec, so the same picture needs more bytes as a JPEG. You are trading size for compatibility, knowingly.

A short summary you can act on

ZIP and a structural PDF re-save lose nothing and may save nothing. JPEG, MP3 and rasterising lose something permanently. Compress once, from the original. If the file must hit a number, prefer fewer pixels over lower quality. And check the result rather than trusting the byte count — for a document, that means selecting text; for a photo, looking at the edges.

More from the blog