Image CompressionJune 2026 · 9 min read

JPEG Compression Explained: Quality vs File Size

JPEG is the most widely used image format in the world, yet most people who work with JPEG files daily do not understand how the compression actually works or what the quality setting means. This guide explains the mechanics of JPEG compression and gives you concrete guidance on choosing the right quality setting for every scenario.

How JPEG Compression Works

JPEG uses a process called discrete cosine transform (DCT) compression. Without going into the mathematics, the key concept is this: JPEG divides the image into small 8×8 pixel blocks, then encodes each block by describing the dominant patterns of colour and brightness rather than storing each pixel individually.

The compression is lossy, meaning it permanently discards information that is considered less perceptible to the human eye. Specifically, JPEG is more aggressive about preserving brightness information (luminance) than colour information (chrominance), because the human eye is more sensitive to contrast and brightness differences than to subtle colour variations.

When you lower the JPEG quality setting, you allow the compression to discard more information from each 8×8 block. This produces a smaller file, but introduces visible artefacts — particularly the characteristic blocky distortions and colour smearing that appear in heavily compressed JPEG images.

What the Quality Scale Means

Most JPEG encoders use a quality scale from 1 to 100. This is not a linear relationship— the quality-to-file-size curve is not uniform. Changes in the 70–90 range have a large impact on file size with minimal visual difference. Changes below 60 are visually significant.

QualityRelative File SizeVisual QualityBest For
95–100~100% (baseline)Indistinguishable from originalArchival, print
85–90~50% smallerExcellent — no visible artefactsProfessional photography, product images
75–80~70% smallerVery good — imperceptible difference on screenWeb images, social media
65–70~80% smallerGood — slight softening in fine detailThumbnails, fast-loading web pages
50–60~87% smallerAcceptable — visible in high-contrast areasForm uploads with strict size limits
Below 50~90%+ smallerPoor — clear blocky artefactsNot recommended for most uses

When JPEG Compression Hurts More Than It Helps

JPEG is not the right format for all images, and compressing the wrong type of image can produce terrible results even at high quality settings:

Text and sharp edges
JPEG smears the boundaries between text characters and background. Screenshots of text, diagrams, and UI elements look awful as JPEG. Use PNG or WebP.
Images with large flat colour areas
Solid colour backgrounds develop visible bands and colour shifts. Use PNG for graphics with uniform colour regions.
Images you will re-edit
Every time you save a JPEG, you lose more quality. Save working copies as PNG or WebP lossless, and export to JPEG only for the final version.
Already-compressed JPEGs
Re-compressing a JPEG introduces generation loss — each compression cycle adds more artefacts. Only compress from the original source when possible.

The Right Quality Setting for Common Use Cases

  • Website hero images and product photos → Quality 75–80

    Invisible quality loss on screen, 60–70% smaller than original.

  • Social media profile and cover photos → Quality 80–85

    Platforms re-compress uploaded images anyway — start with good quality.

  • Email attachments → Quality 70–75

    Keeps files small enough to send. Quality is sufficient for preview.

  • Passport and visa form uploads → Quality 60–70

    Needed to hit strict size limits (20–50 KB). Faces remain identifiable.

  • Print (home printing) → Quality 90–95

    Printed at 300 DPI, artefacts become visible at low quality.

  • Archival and professional photography → Quality 95–100

    Keep the highest quality — storage is cheap.

Compress JPEG Images Free