Explainer

Lossy vs Lossless Compression: What You Need to Know

Learn the difference between lossy and lossless compression for images and audio. Understand when quality loss matters and when it doesn't.

February 22, 202611 min read

Convert-To Editorial Team

Editorial Policy

You've used ZIP compression before: select a folder, compress it, and the resulting archive is smaller. Extract it later and every file is identical to the original — every byte, every pixel, every character. Now imagine a different kind of compression where the extracted files are slightly different from the originals. Not corrupted, just simplified. The text is all there, but the images are a little softer, the audio a little thinner. That's the fundamental divide between lossless and lossy compression, and understanding the difference affects every decision you make about file formats, from choosing between JPG and PNG for a photograph to selecting between MP3 and FLAC for a music library.

What "Lossy" and "Lossless" Actually Mean

Lossless compression reduces file size without discarding any data. When you decompress a lossless file, you recover the original bit-for-bit. ZIP, PNG, FLAC, and TIFF (with LZW compression) are all lossless — the compression is fully reversible.

Lossy compression reduces file size by permanently removing data the algorithm deems expendable. JPG discards fine visual detail that human eyes are least sensitive to. MP3 removes audio frequencies that fall below the threshold of human hearing. The original data cannot be recovered from a lossy-compressed file, no matter what software you use.

PropertyLossy CompressionLossless Compression
Data after decompressionApproximation of originalExact copy of original
Typical file size reduction80-95%20-60%
Quality impactSome loss (often imperceptible)No loss whatsoever
ReversibilityIrreversibleFully reversible
Common formats (image)JPG, WebP (lossy), HEICPNG, TIFF, BMP, WebP (lossless)
Common formats (audio)MP3, AAC, OGG VorbisFLAC, ALAC, WAV (uncompressed)
Primary use caseDistribution, web deliveryArchival, editing, production

How Lossy Compression Decides What to Discard

Lossy compression isn't random. It relies on decades of research into human perception — specifically, what our eyes and ears can't detect under normal conditions.

For images (JPG, WebP lossy), the process works in stages:

  1. Color space conversion — The image is converted from RGB to YCbCr, separating brightness (luminance) from color (chrominance). Human vision is far more sensitive to brightness changes than color changes, so the chrominance channels can be stored at lower resolution (a technique called chroma subsampling, typically 4:2:0).

  2. Block division — The image is divided into 8x8 pixel blocks (JPG) or variable-size blocks (WebP).

  3. Frequency transform — Each block is transformed into frequency components using the Discrete Cosine Transform (DCT). Low frequencies represent smooth gradients and large shapes; high frequencies represent fine detail, sharp edges, and noise.

  4. Quantization — This is where data is actually discarded. The high-frequency components are divided by a quantization factor and rounded to zero. The higher the compression, the more aggressive the rounding, and the more detail disappears.

  5. Entropy coding — The remaining non-zero values are compressed further using lossless techniques (Huffman coding or arithmetic coding).

For audio (MP3, AAC), a similar perceptual model applies. The encoder uses a psychoacoustic model to identify frequencies masked by louder neighboring frequencies (auditory masking) and frequencies below the threshold of human hearing. These are reduced or removed before the remaining audio is compressed.

How Lossless Compression Preserves Everything

Lossless compression finds and eliminates redundancy without removing unique information. The most common techniques include:

  • Run-length encoding (RLE) — Instead of storing "white, white, white, white, white," store "5x white." This is why screenshots with large areas of solid color compress so efficiently in PNG.

  • Dictionary-based compression (LZ77, LZW) — The algorithm builds a dictionary of repeating patterns and replaces them with shorter references. This is how ZIP, GZIP, and PNG's DEFLATE work.

  • Prediction filters — PNG uses row filters that predict each pixel based on its neighbors. Instead of storing absolute values, it stores the difference between the prediction and the actual value. Differences tend to be small numbers that compress well.

  • Entropy coding — Frequently occurring values are assigned shorter codes (Huffman coding). In an image with mostly white pixels, white gets a very short code while rare colors get longer ones.

The key constraint: lossless compression can only reduce file size as much as the data contains redundancy. A photograph of a complex natural scene has little redundancy — every pixel is slightly different from its neighbors — which is why PNG photographs are 5-10x larger than their JPG equivalents. A screenshot with a white background and black text has enormous redundancy, making PNG compression extremely efficient for that content.

Compression Ratios: The Numbers

The gap between lossy and lossless is significant. Here's what typical compression looks like for a 1920x1080 image (uncompressed size: approximately 6.2 MB in 24-bit RGB):

FormatCompression TypeTypical SizeCompression RatioQuality
BMP (uncompressed)None6,220 KB1:1Perfect
PNGLossless2,800 KB2.2:1Perfect
WebP (lossless)Lossless2,100 KB3.0:1Perfect
JPG (quality 95)Lossy650 KB9.6:1Near-perfect
JPG (quality 85)Lossy350 KB17.8:1Minimal artifacts
WebP (quality 80)Lossy190 KB32.7:1Minimal artifacts
JPG (quality 50)Lossy120 KB51.8:1Noticeable softening
JPG (quality 20)Lossy48 KB129.6:1Heavy artifacts

For audio, the pattern is similar. A 3-minute song at CD quality (44.1 kHz, 16-bit, stereo) has an uncompressed size of about 31.7 MB (WAV):

FormatCompression TypeTypical SizeCompression Ratio
WAVNone31,700 KB1:1
FLACLossless19,000 KB1.7:1
MP3 (320 kbps)Lossy7,200 KB4.4:1
MP3 (128 kbps)Lossy2,880 KB11.0:1
AAC (128 kbps)Lossy2,880 KB11.0:1

The trade-off is clear: lossy compression achieves dramatically smaller files, but lossless compression maintains mathematical perfection.

Formats by Compression Type

Not every format fits neatly into one category. Some formats support both modes, and some use no compression at all.

CategoryImage FormatsAudio FormatsDocument Formats
UncompressedBMP, raw TIFFWAV, AIFF
Lossless onlyPNG, GIFFLAC, ALAC
Lossy onlyJPGMP3, OGG Vorbis
Both modesWebP, TIFF, HEIF
Internal compressionPDF (various), DOCX (ZIP-based)

WebP is notable for offering both lossy and lossless compression in the same format. You choose the mode at export time. HEIF (and its video-derived variant HEIC used by Apple) also supports both modes, defaulting to lossy for photographs.

The One-Way Door: Why Lossy Compression Is Irreversible

This is the most commonly misunderstood aspect of compression: converting a lossy file to a lossless format does not recover lost quality.

When you convert a JPG to PNG, the PNG faithfully preserves every pixel in the JPG — including all the compression artifacts. The file gets larger (because PNG doesn't discard anything), but the visual quality is identical to the JPG. The lost detail is gone permanently; it was discarded during the original JPG encoding.

The reverse is worse: converting a lossless file to lossy and then back to lossless applies lossy compression once, embedding the artifacts permanently. This round-trip damages the file with no benefit.

A practical analogy: lossy compression is like summarizing a book. The summary is shorter and captures the key ideas, but you can't reconstruct the original word-for-word text from the summary. Lossless compression is like abbreviating a book using shorthand — it's shorter and fully recoverable because every abbreviation maps back to a specific word.

Convert-To Tip

If you've already saved a file in a lossy format and need to edit it, convert it to a lossless format (like JPG to PNG) before making changes. This doesn't recover lost quality, but it prevents further quality loss from re-compression during your editing workflow. Save to lossy only once, at the very end.

When Lossy Compression Is the Right Choice

Lossy compression isn't inherently bad — it's an engineering trade-off. The right situations for lossy compression:

Web delivery: A website serving a 5 MB PNG photograph to every visitor wastes bandwidth. The same image as a 200 KB JPG at quality 85 loads 25x faster and looks identical on screen. For a page with 20 product images, that's the difference between a 100 MB page load and a 4 MB one.

Social media and messaging: Platforms like Instagram, WhatsApp, and Twitter re-compress uploaded images anyway. Uploading a lossless PNG that gets re-encoded to JPG by the platform provides no quality advantage — the platform's encoder makes the lossy decision regardless.

Streaming audio: A podcast encoded as FLAC would consume approximately 4x more bandwidth than MP3 at 128 kbps. For spoken word content, where the frequency range is limited and background noise is common, the quality difference is inaudible to most listeners.

Storage-constrained environments: A phone with 64 GB of storage can hold roughly 12,000 photographs as JPG (at ~5 MB each) or roughly 2,000 as PNG (at ~30 MB each). For most phone photography, the JPG trade-off makes sense.

When Lossless Compression Is Worth the File Size

Certain workflows demand lossless quality, regardless of file size:

Professional editing and production: Photographers, graphic designers, and audio engineers work from lossless masters. Every edit, filter, and adjustment is applied to the full-quality data. Lossy originals limit what editing can achieve — you can't sharpen detail that was already discarded by compression.

Medical and scientific imaging: An X-ray or microscopy scan compressed with lossy algorithms could lose diagnostically relevant detail. Medical imaging standards (DICOM) support lossless compression specifically for this reason.

Archival and preservation: Libraries, museums, and record labels archive in lossless formats (TIFF for images, FLAC for audio) because future technology may benefit from the full original data. Lossy compression is a one-way decision — once detail is removed, it cannot be restored regardless of future advances.

Text and line art: Screenshots, scanned documents, architectural drawings, and QR codes contain sharp edges and precise detail that lossy compression handles poorly. A QR code saved as JPG at low quality may become unscannable because the compression blurs the precise boundaries between black and white modules.

Audio mastering: A mastering engineer working on a final album mix uses 24-bit WAV or FLAC throughout production. Converting to MP3 at any point in the chain introduces artifacts that subsequent processing can amplify. The MP3 export happens once, at the very end, for consumer distribution.

Privacy Note

When compressing files online, the original uncompressed data is uploaded before compression is applied. If your files contain sensitive information (medical records, confidential documents, personal photographs with GPS metadata), consider whether online compression is appropriate. When you convert a file on Convert-To.co, it is processed by CloudConvert, a GDPR-compliant and ISO 27001 certified service. All files are automatically deleted within 15 minutes after conversion. Convert-To.co does not store your files on its own servers. For highly sensitive material, offline tools like ImageOptim or FFmpeg provide local compression without any upload. See our file conversion privacy guide for more detail.

Tags

compressionlossylosslessimage qualityaudio quality
Back to Blog
Updated 2/22/2026

Try It Now

Ready to use PNG to JPG? Convert your files for free with our online tool.

Use PNG to JPG

Try It Now

Ready to use JPG to WEBP? Convert your files for free with our online tool.

Use JPG to WEBP

Try It Now

Ready to use Compress Image? Convert your files for free with our online tool.

Use Compress Image