JPEG Compressor
Published Updated
Lower a JPEG's quality anywhere from 100 down to 1, or shrink it to 75%, 50% or 25% of its pixel size, and watch the file size update before you save.
Quality 75 cut a 300 KB photo to 128 KB; quality 95 made it bigger
The tool decodes your JPEG, draws it on a canvas at the scale you choose, and asks the browser to encode it again as JPEG at the quality on the slider. That number goes to the browser's encoder as a value between 0 and 1, which MDN's canvas toBlob reference describes as the image quality for lossy formats.
JPEG is a lossy format, as MDN's image format guide puts it, so a new encode never restores detail. It only decides how much more to throw away. A high setting on a file saved at a modest quality spends more bytes on the same blurred details.
Measured sizes for one test photo
A 2,000 x 1,500 photo-like test image of 300 KB, encoded through the tool's steps in Google Chrome 156. Sizes as the tool shows them:
| Quality | 100% (2,000 x 1,500) | 50% (1,000 x 750) | 25% (500 x 375) |
|---|---|---|---|
| 100 | 1.24 MB | 423.3 KB | 188.2 KB |
| 95 | 355.0 KB | 135.4 KB | 45.0 KB |
| 90 | 278.5 KB | 87.6 KB | 29.5 KB |
| 75 (default) | 128.4 KB | 42.4 KB | 15.7 KB |
| 50 | 70.2 KB | 24.8 KB | 10.7 KB |
| 25 | 41.2 KB | 16.7 KB | 7.5 KB |
| 10 | 28.1 KB | 10.3 KB | 4.4 KB |
Your own photos will differ, since detail and noise drive the size. What carries over is the shape of the table: past a certain setting, a higher number only adds bytes.
What each browser's encoder makes of the quality number
The slider value is handed to the browser's own JPEG encoder, so the result depends on the browser. One test picture, 2,000 x 1,500 pixels, saved at quality 90 by Pillow (480,991 bytes, shown on the card as 469.7 KB), was compressed with the tool in Chrome 156, Chromium 153 (Playwright build, not Google Chrome), Firefox 155 and Playwright's WebKit build (not the Safari app). Each cell is the size on the result card. Original kept means the card offered the original file because the new JPEG, size in brackets, would have been bigger.
| Setting | Chrome 156 | Chromium 153 | Firefox 155 | WebKit build |
|---|---|---|---|---|
| Quality 95 | Original kept (533.3 KB) | Original kept (533.1 KB) | Original kept (761.9 KB) | Original kept (661.1 KB) |
| Quality 90 | 423.1 KB | 423.1 KB | Original kept (547.7 KB) | Original kept (626.9 KB) |
| Quality 75 (default) | 137.7 KB | 137.8 KB | 167.4 KB | Original kept (491.2 KB) |
| Quality 50 | 61.4 KB | 61.1 KB | 84.8 KB | 204.8 KB |
| Quality 25 | 35.7 KB | 35.7 KB | 61.4 KB | 66.0 KB |
| Quality 75 at 50% scale (1,000 x 750) | 32.9 KB | 32.4 KB | 36.4 KB | 92.8 KB |
Chrome and Chromium made nearly identical files. Firefox used the same average luminance step as Chrome at each setting (29.0 at 75) and still wrote larger files. The WebKit build maps the number differently: its 75 used much finer steps (average 8.6), and even its 50 (24.7) was finer than the others' 75, which is why its 75 gave no saving here. A 4,000 x 3,000 photo of 1.75 MB took under half a second per change in every engine, the tool's 200 ms pause included.
What the compressed JPEG keeps, drops and adds
Read from the bytes of the files the tool offered in Chrome 156, Chromium 153, Firefox 155 and the WebKit build. Where a cell names quality 10, the card kept the original at 75 in that engine, so a lower setting was used to get a new file.
| Input or detail | Chrome 156 and Chromium 153 | Firefox 155 | WebKit build |
|---|---|---|---|
| Colour detail (chroma) at quality 75 | Half resolution (4:2:0) | Half resolution (4:2:0) | Half resolution (4:2:0) |
| Colour detail at quality 95 | Half resolution (4:2:0) | Full resolution (4:4:4) | Half resolution (4:2:0) |
| Colour profile block | One added by the browser | None | None |
| EXIF block | None | None | A small one written by the browser |
| Progressive source (410.9 KB) | Baseline JPEG, 137.7 KB at 75 (Chromium 137.8 KB) | Baseline JPEG, 167.4 KB at 75 | Baseline JPEG at 10 (at 75 the card kept the original) |
| Greyscale source, one channel (155.8 KB) | Three colour channels, 47.0 KB at 75 | Three colour channels, 56.9 KB at 75 | Three colour channels at 10 (at 75 the card kept the original) |
| Phone photo stored 400 x 300 with orientation 6 | Upright, 300 x 400, no tag | Upright, 300 x 400, no tag at 10 (at 75 the card kept the original) | The card kept the original at 75 and at 10 |
| CMYK source (red quadrant 220,40,40 as Pillow wrote it) | RGB file, red 220,40,41 | RGB file, red 220,40,41 | RGB file, red 195,73,60 |
A flat 200,100,50 picture tagged with the Display P3 profile shows the colour handling. Chrome, Chromium and the WebKit build converted it to sRGB numbers (215,93,30 and 214,93,30 at quality 95) and wrote no P3 profile, so it keeps its look. Firefox read the numbers as they are stored (200,100,50) and saved them without the profile, which then reads them as ordinary sRGB. EXIF tags of the original, such as the camera make, did not appear in any new file from Chrome, Chromium or Firefox.
Shrinking a JPEG
Step 1
Add a JPEG
Its pixel size and file size are shown, and a first version at quality 75 is made straight away.
Step 2
Move the slider or pick a scale
Each change re-encodes the image 200 milliseconds after you stop, and the preview and size line follow.
Step 3
Check the size, then download
Compare the new size with the original first; a smaller file is saved with -compressed added to its name.
What else changes in the new file
- Metadata. EXIF, including GPS position and camera details, is not copied. EXIF Remover works the same way when metadata is the only thing you want gone.
- Orientation. Browsers turn images by their EXIF tag by default, per MDN's image-orientation page. A test photo tagged to be shown rotated came out upright at 300 x 400 with no tag.
- Pixel size. Only 100%, 75%, 50% or 25%. For an exact width, use Resize Image; when the file has to stay under a cap like 200 KB, Compress Image to Size searches for the setting.
- Format. Always JPEG. PNG and WebP files go to Image Compressor.
JPEG compression questions
What quality setting should I use?
Start with the default of 75 and look at the preview closely. In the test above it removed 57% of the file. For pictures shown small on a web page, 50 to 60 is usually enough; keep 85 to 90 for photos people will zoom into or print.
Why can a re-encoded JPEG be bigger than my original?
Your original was probably saved at a lower quality than the one you picked. Encoding it again at 95 or 100 spends more bytes on the same picture and cannot bring back detail that was already lost. In the test, 95 gave 355.0 KB and 100 gave 1.24 MB from a 300 KB file. At 100% scale the card then says re-encoding would not make it smaller and offers your original file unchanged. At a smaller scale it offers the resized JPEG, says it is bigger, and adds a button for the original. Move the slider down until the card shows a saving.
Should I lower the quality or the scale?
Scale removes pixels: 50% keeps a quarter of them, and at quality 75 the test file dropped from 128.4 KB to 42.4 KB. Use it when the image is bigger than where it will be shown. Lower the quality when the pixel size has to stay.
Does it keep the EXIF data?
No. The image is redrawn on a canvas, which holds pixels only, so the camera model, date, location and other EXIF fields are dropped. A photo stored sideways with an orientation tag comes out upright and untagged, because the browser applies the tag while drawing it: Chrome 156, Chromium 153 and Firefox 155 all did.
Can I compress PNG or WebP files here?
No, the file picker takes JPEG only. Image Compressor accepts other formats and can save them as JPEG or WebP.
Does every change lose a little more quality?
No, each run starts again from the file you added, not from the last result. Repeated rounds only add up if you download a result and compress that download again.
Why does the same quality give different sizes in different browsers?
The number goes to the browser's own JPEG encoder, and each one turns it into its own settings. At the default 75, a 469.7 KB test photo came out at 137.7 KB in Chrome 156 and 167.4 KB in Firefox 155, while in the WebKit build the new file would have been 491.2 KB, so the card offered the original. If a setting gives no saving in your browser, try a lower one; the WebKit build's 50 gave 204.8 KB.
Is a black-and-white JPEG kept black-and-white?
It still looks grey, but the new file has three colour channels. A one-channel 1,200 x 900 test JPEG of 155.8 KB came back as a three-channel file of 47.0 KB at quality 75 in Chrome 156 and 56.9 KB in Firefox 155. The WebKit build also wrote three channels, at quality 10.
Does a progressive JPEG stay progressive?
No. The new file is a baseline JPEG, which loads top to bottom instead of from blurry to sharp. A progressive 410.9 KB test photo came back as a baseline file in Chrome 156, Chromium 153, Firefox 155 and the WebKit build (there at quality 10, because at 75 the card kept the original).
What happens to a CMYK JPEG?
It is opened, turned into ordinary RGB and saved as an RGB JPEG. Chrome 156, Chromium 153 and Firefox 155 kept the colours Pillow had written (a red of 220,40,40 came out as 220,40,41). The WebKit build read the same CMYK file with different colours (195,73,60 for that red), so check CMYK files from print work before you replace them.