Pricing P2P Encrypted Chat Desktop App Browser Extension
Upload a file
← Back to Blog

Will Compressing a File Reduce Quality?

— Written by Brendan, Founder of FileShot.io

File compression — will it reduce quality? Comparing lossy and lossless compression types

Short answer: It depends entirely on the type of compression. Lossless compression never reduces quality. Lossy compression always does — by design. The two work in completely different ways, and knowing which type applies to your file is the whole game.

Quick reference:
  • ZIP, 7z, TAR.GZ, RAR — lossless. No quality change. Ever.
  • PNG, WebP lossless, GIF — lossless. No quality change.
  • FLAC, ALAC, WAV — lossless audio. No quality change.
  • JPEG, lossy WebP, AVIF — lossy. Quality is reduced.
  • MP3, AAC, OGG, Opus — lossy. Quality is reduced.
  • H.264, H.265, VP9, AV1 — lossy video. Quality is reduced.

What Is Lossless Compression?

Lossless compression reduces file size by finding and eliminating redundancy in the data, without discarding any information. When you decompress a losslessly-compressed file, you get back an exact copy of the original — every single bit is preserved.

Think of it like abbreviating a sentence: "The The The The The" — "The ?5". The meaning is preserved, just stored more efficiently. No information is lost — it's perfectly reversible.

Common lossless algorithms include:

  • DEFLATE — used by ZIP, PNG, gzip, zlib
  • LZMA / LZMA2 — used by 7z, XZ
  • Brotli — used for web content compression
  • LZ4 / Zstandard — fast lossless compression for real-time use

Does Zipping a File Reduce Quality?

No. ZIP uses lossless DEFLATE. When unzipped, the file is bit-for-bit identical to the original. A 20MB PDF zipped to 18MB is still the exact same PDF once extracted. The apparent size reduction comes from removing redundancy in the file's data structure — nothing is discarded.

This is also why zipping an already-compressed file (like a JPEG or MP3) barely reduces its size — those files already have their redundancy stripped by their own compression. You can't compress something that's already compact.

What Is Lossy Compression?

Lossy compression deliberately discards information that is considered less important to human perception, in exchange for significantly smaller file sizes. This is a permanent, one-way process — once data is discarded, it cannot be recovered.

The "less important" data being discarded is determined by psychoacoustic models (for audio) and psychovisual models (for images/video) — areas of the signal that human eyes and ears are less sensitive to. Done well, the result is imperceptible. Done aggressively, artifacts appear: blocky JPEG compression, audio that sounds "crunchy," pixelated video.

How Compression Affects Each File Type

Images

JPEG — always lossy. Every save operation in JPEG format discards information. This matters especially for JPEG-to-JPEG workflows: re-saving an already-compressed JPEG further degrades quality with each round-trip. At high quality settings (90—95%), the degradation is minimal. At low settings (50—60%), blocking artifacts become visible, particularly around sharp edges and text.

PNG — always lossless. Compressing a PNG to a smaller PNG preserves every pixel exactly. PNG files can vary in size depending on their compression level (0—9), but decompressed output is always identical regardless of the level chosen.

WebP — supports both. WebP lossless mode: no quality loss. WebP lossy mode (the default in most tools): quality is reduced, similar to JPEG but typically at smaller size for equivalent quality.

GIF — technically lossless, but the format itself is limited to 256 colors, so converting a full-color image to GIF causes quality loss. A GIF re-saved as GIF: no quality loss.

Audio

MP3, AAC, OGG, Opus — all lossy. These formats discard audio frequencies that psychoacoustic models predict humans won't notice. At high bitrates (320 kbps MP3, 192 kbps AAC), quality loss is often inaudible except on high-end equipment. At low bitrates (64 kbps or below), artifacts like "underwater" sound, smearing of transients, and audible noise become apparent.

FLAC, ALAC, WAV (uncompressed) — lossless. FLAC typically achieves 40—60% size reduction with zero quality loss. WAV is uncompressed — no quality change but also no size reduction.

Video

Almost all practical video formats — H.264 (MP4), H.265 (HEVC), VP9, AV1, H.263 — use lossy compression. Video compression is extremely aggressive because raw video is enormous: a 10-minute 1080p video at 30 fps uncompressed is around 200GB. H.264 at reasonable quality compresses this to ~1—3GB.

The quality settings in video encoding (CRF values, target bitrate) directly control the trade-off between quality loss and file size. Lower CRF = higher quality, larger file. Higher CRF = more loss, smaller file.

Re-encoding already-compressed video is particularly damaging. Each encode-decode cycle adds more generation loss. If you need to edit video, always work from the highest-quality source available and only encode to final format once.

Documents (PDF, Word, etc.)

PDF compression can be lossless or lossy depending on what's being compressed and the compression settings used:

  • Text and vector elements — always lossless (they're math, not pixels). The text in a compressed PDF is identical to the text in the original.
  • Embedded images — can be either. Many PDF compressors downscale or re-encode embedded images using JPEG, which is lossy. If image quality matters, check your PDF compressor's settings.

Archives (ZIP, 7z, RAR, TAR)

All archive formats are lossless. They are containers — they don't change the data inside, they just package it with compression. Extracting a file from a ZIP gives you the original file exactly as it was when it was added.

The "Re-Compression" Problem

A critical but underappreciated issue: re-compressing a file that is already lossy-compressed causes cumulative quality loss.

Example: A JPEG photo is saved at quality 85. You then open it and save it again at quality 85. The second save applies JPEG compression to already-compressed data. The result looks worse than the first save, even though you used the same quality setting. Repeat this 5—10 times and the image degrades noticeably.

This is called generation loss. It's why professional photographers always work in RAW (lossless) format and only export to JPEG as the final step. It's why video editors work in ProRes or DNxHD (high-quality intermediates) rather than H.264 during editing.

The rule: always compress from the original, uncompressed source, as late in your workflow as possible.

Practical Guide: When to Use Each

Use Case Recommended Format Quality Loss?
Photos for web (need small size)JPEG quality 80—85, or WebP lossyYes — minimal at 80+
Photos for archiving / editingPNG or RAW (lossless)No
Music streaming / distributionAAC 256 kbps or MP3 320 kbpsYes — inaudible at high bitrate
Music archiving / mastering sourceFLAC or WAVNo
Sending files via email / shareZIP (lossless)No
Video for web playbackH.264 or H.265Yes — acceptable at good CRF
Code / text / softwareZIP, 7z, gzipNo (lossless only)

What About Compressing Files Before Sharing?

If you're sharing files and worried about quality, the recommendation is straightforward:

  • Wrap files in a ZIP — lossless, the recipient gets exactly what you had. No quality consideration needed.
  • Share directly without re-encoding — if the file is already in its final format (a JPEG you're happy with, a finished MP4), share it as-is. Don't run it through an extra compression step.
  • Use a file sharing service that doesn't re-encode — platforms that re-process uploads (to generate previews, enforce size limits, or optimize storage) can inadvertently degrade quality. FileShot stores and serves your file exactly as you upload it — no server-side re-encoding happens.

Conclusion

Will compressing a file reduce quality? Lossless compression: never. Lossy compression: always, by varying degrees. The key is understanding which type applies to your file format and your tools.

For sharing files without any quality consideration at all: upload them as-is to a service that doesn't re-encode. FileShot stores your encrypted file bytes exactly as uploaded — no re-processing, no re-encoding, no quality changes.

Share files at original quality with FileShot ?  |  Try our File Compressor tool  |  File Format Converter