Browse all tools
jpg compressor tool
Image Guides7 min read

How JPEG Compression Works and How Much Quality to Use

Understand lossy JPEG encoding, visible artifacts, repeated re-encoding and when PNG or WebP is a better fit, with measured results from four test images.

Written byUrvish ParmarUpdated August 20, 2026

In this guide

Table of Contents

  1. 1.How JPG compression actually works
  2. 2.What the quality setting actually controls
  3. 3.What four test images actually did
  4. 4.Why the PNGs did not move at all
  5. 5.Each level buys less than the one before
  6. 6.When JPEG is the wrong answer entirely
  7. 7.Re-compressing a JPEG compounds

JPEG compression trades image information for fewer bytes. The useful question is not whether a particular quality number is universally best, but whether the exported image preserves the detail that matters at its final display size. FiloTool's JPG Compressor performs that re-encoding in the browser.

This guide covers what actually happens when you compress a JPG, which quality setting to use for which situation, and why some images shrink dramatically while others do not move at all — including four test images we measured, one of which came back byte-for-byte identical at every setting.

Try JPG Compressor Online

Complete this task using FiloTool's JPG Compressor directly from your browser.

Open JPG Compressor

How JPG compression actually works

JPEG doesn't compress an image the way a ZIP file compresses text. A ZIP file has to be perfectly reversible — every byte has to come back exactly as it went in. JPEG doesn't play by that rule. It's a *lossy* format, which means it deliberately throws away information the human eye is bad at noticing, and keeps the information your eye is good at noticing.

Two things get discarded first: **Color detail** and **Fine texture in busy areas**. Human vision is far more sensitive to changes in brightness than changes in color. JPEG encoders exploit this by storing color information at lower resolution than brightness information — a technique called chroma subsampling.

What the quality setting actually controls

Every JPG compressor gives you some version of a quality slider or percentage. Here's what it's actually doing: it controls how aggressively the encoder simplifies each block before writing it to the file. Higher number, less simplification, bigger file. Lower number, more simplification, smaller file — and past a certain point, visible artifacts.

Quality numbers are encoder-specific and the same setting can behave differently across images. Export a candidate, then inspect faces, fine texture, gradients and high-contrast edges at the intended viewing size. Keep the least-compressed result that meets the destination's size requirement rather than relying on a universal percentage.

What four test images actually did

Rather than assert what compression achieves, here is the complete measurement set behind FiloTool's three compression levels. Four fixtures were encoded and measured in bundled Playwright Chromium on 2026-08-13, using the same Canvas MIME types and preset quality values the production tool uses, including the production behaviour of keeping the original file when a candidate is not smaller.

The two lossy formats respond to the levels roughly as you would expect:

  • Synthetic JPEG photo, 32,732 bytes — Quality 16,002 bytes (−51.1%), Smart 11,723 bytes (−64.2%), Extreme 7,997 bytes (−75.6%)

  • Synthetic WebP photo, 12,958 bytes — Quality 7,572 bytes (−41.6%), Smart 5,266 bytes (−59.4%), Extreme 4,516 bytes (−65.2%)

  • Text-heavy PNG screenshot, 7,512 bytes — Quality, Smart and Extreme all returned 7,512 bytes (0%)

  • Transparent PNG graphic, 33,399 bytes — Quality, Smart and Extreme all returned 33,399 bytes (0%)

Why the PNGs did not move at all

Both PNG fixtures came back byte-for-byte identical at every level, and that is the system working correctly rather than failing. Browser Canvas PNG encoding exposes no lossy quality control, so all three levels perform the same lossless PNG re-encode. When that re-encoded candidate is not smaller than the file you started with—which is common for an already-efficient PNG—the tool discards its own output and hands back your original.

The practical consequence is worth internalising: for a screenshot or a flat graphic already stored as PNG, a compression slider has nothing to pull on. If such a file genuinely needs to be smaller, the lever is changing format or reducing dimensions, not turning compression up. Converting a screenshot to JPG will make it smaller and will also put ringing around every letter, which is usually the wrong trade—compare formats on a real file before committing.

Each level buys less than the one before

Read the JPEG row again as a progression rather than three separate options. Moving from Quality to Smart saved a further 4,279 bytes; moving from Smart to Extreme saved 3,726 more. The absolute savings shrink while the visual cost keeps climbing, because the encoder is now discarding information you were more likely to notice.

That shape is the argument for choosing the least aggressive level that meets your actual constraint. If a 12 MB upload limit is the constraint and Quality gets you under it, Extreme buys you nothing you needed and costs detail you cannot get back.

When JPEG is the wrong answer entirely

If your PNG screenshot will not shrink, the instinct is to convert it to JPG. A separate FiloTool benchmark, encoded with sharp 0.34.5 on 2026-08-02, measured exactly that case and the result argues against it. Starting from a 59,145-byte interface screenshot:

The same pattern held for a flat illustration, where JPG saved 13.3% and was the only output the reviewer marked as showing visible artifacts—ringing and colour bleed along hard diagonal edges—while WebP saved 61.4%. So the honest sequence for a stubborn PNG is: try a different format before you try harder compression, and reach for Image Converter rather than a quality slider.

  • JPG at quality 80 — 48,398 bytes, a saving of only 18.2%, with faint halos around small text and one-pixel rules

  • WebP at quality 80 — 21,234 bytes, a saving of 64.1%, at a higher measured PSNR than the JPG

  • AVIF at quality 80 — 19,353 bytes, a saving of 67.3%, with text and rules still crisp in the inspected crop

Re-compressing a JPEG compounds

Every JPEG save is a fresh lossy encode of whatever was decoded, not an edit of the previous file. Compress an image, open the result, compress again, and the second pass discards information based on artifacts the first pass introduced. This is generation loss and it accumulates, which is why a photograph that has been through several messaging apps looks soft in a way no single save explains.

Keep the highest-quality original you have and re-derive from it each time you need a different size or setting. Never treat a compressed export as your working copy.

Ready to Use JPG Compressor?

Open the tool, upload your file and complete the task in a few simple steps.

Try It Now

Common questions

Frequently Asked Questions

Clear answers to common questions about this topic and the related FiloTool tool.

Does compressing a JPG lower its resolution?

No. Compression and resolution are independent. Compressing reduces file size by simplifying color and detail data; it doesn't change the pixel dimensions unless you separately resize the image.

Can I compress a JPG multiple times without losing quality?

Each time you re-save a JPEG, you lose a small amount of additional quality, even at a high setting — this is generation loss, and it's cumulative.

Is there a quality setting that guarantees no visible difference?

Not universally — it depends on the image's content and how it will be viewed.

What is the difference between JPG and other formats?

JPG is the right format for photographs with continuous tone and color — landscapes, portraits, product photos. It's the wrong format for images with sharp edges, flat color areas, transparency, or text — screenshots, logos, and graphics with a small number of distinct colors compress worse in JPG than in PNG or WebP.

Why did compressing my PNG do nothing?

Browser Canvas PNG encoding has no lossy quality control, so all three levels run the same lossless re-encode. When the result is not smaller than your original, the tool returns the original instead. In our measurements both PNG fixtures came back byte-for-byte identical at every level.

Which compression level should I choose?

The least aggressive one that meets your actual constraint. Savings shrink at each step while visible cost rises: in our JPEG fixture, Quality to Smart saved 4,279 further bytes and Smart to Extreme only 3,726 more.

Does the compressor change my image's format?

No. A JPG stays a JPG, a PNG stays a PNG and a WebP stays a WebP. If changing format is what you actually need, use the Image Converter instead.

Useful Tools

Continue with These Tools

These workflows are selected for the next steps most closely related to this guide.

About the author

UP

Urvish Parmar

Software engineer, developer of FiloTool

Urvish Parmar is a software engineer and the developer of FiloTool. He builds and maintains the browser-local PDF and image tools published on this site, and writes the guides that document how they behave.

Because the same person implements a tool and documents it, these guides describe what the code actually does — including the formats it rejects, the limits it hits and the results it cannot promise.

Read how FiloTool tests and updates its content on the About page, or report an error through Contact.

7 min read

An updated date is shown only when the article's instructions, evidence or material guidance changed.

Continue reading

Related Articles

Explore more practical PDF and image guides from FiloTool.

View all guides →