Image Compressor

A 4.2 MB phone photo re-encoded as JPEG at quality 80 with the long edge capped at 1920 pixels usually lands under 400 KB, and on a screen the two are hard to tell apart. Almost all of that saving comes from the pixel cap rather than the quality setting.

10 to 100. Between 75 and 85 is where the loss stops being visible on screen.
1600 to 2000 covers almost any web use
Image Compressor — Shrink JPEG and WebP Files Without Uploading ThemBuildFigure

The file stays on your machine

Compression services that run server-side have to receive the photograph before they can shrink it, which for anything containing a person, a document or a location tag is a decision worth making deliberately. This does not receive anything. The file is decoded by the browser, redrawn into a canvas, and re-encoded by the same code that handles image saving elsewhere in the browser. No request leaves the page. Disconnect from the network and it still works, which is the simplest way to confirm it.

Where the saving actually comes from

Two separate mechanisms are at work and they are not equal. JPEG and WebP are lossy: they transform the image into frequency components and discard the ones the eye is least sensitive to, which is a smooth trade you steer with the quality number. Going from 100 to 80 typically more than halves the file for a change most people cannot see on a screen. Below about 60 the block structure starts showing around hard edges and around text.

The pixel cap is the blunter and usually larger effect. A phone camera produces something over 4000 pixels wide; a web page rarely displays more than 2000. Halving the long edge quarters the pixel count, and file size follows roughly in proportion. If you only change one setting, change that one.

Choosing the format

FormatUse it whenWatch out for
JPEGPhotographs, email attachments, anything going to a print shop or an old systemNo transparency — alpha is filled with white
WebPWeb pages and app assets, where 25-35% smaller at the same quality is freeSome desktop software and older tools still will not open it
PNGScreenshots, logos, line art, anything needing transparencyLossless, so the quality setting does nothing and photographs balloon

Re-encoding always costs something

This is the limitation to be clear about. A JPEG that is opened and saved again loses data even at quality 100, because it is decoded to pixels and then put back through the transform, and the second pass has to spend bits describing the artefacts the first pass introduced as though they were real detail. That is why quality 100 can produce a file larger than the original that also looks slightly worse. Compress from the largest, least-processed version you have, once, rather than repeatedly nudging an already-compressed file.

PNG behaves differently and no better. It is lossless, so a re-save changes nothing about the picture and the quality control is inert; the only route to a smaller PNG is fewer pixels or a reduced palette, which is quantisation and is not what this does. And two things get dropped on the way through regardless of format: EXIF metadata, including GPS coordinates, and any embedded colour profile, which can shift colours perceptibly on wide-gamut originals. Orientation is applied by current browsers before drawing, so the output is upright, but that behaviour was not always there. Whether losing the metadata is a feature or a problem depends entirely on whether you are publishing the image or archiving it.

Questions people ask

Is my photo uploaded anywhere?

No. Reading, decoding, scaling and encoding all run in JavaScript in the page you have open, using the browser image pipeline. Nothing is transmitted, nothing is cached on a server, and there is nothing to delete afterwards. If you want to confirm rather than trust: open your browser dev tools, watch the network tab while you pick a file and compress it, and you will see no request. It also works offline.

I lowered the quality and the file barely shrank.

The source was probably already compressed hard — a photo that has been through a messaging app or a social platform has had most of the removable data removed already, and asking for quality 80 on something saved at quality 70 gives you almost nothing back. Capping the long edge is the lever that still works in that situation, because it removes pixels rather than detail within pixels. Halving the long edge cuts the pixel count to a quarter.

Why will my iPhone photos not open?

They are HEIC, and outside Safari most browsers cannot decode it. Two fixes: change Camera settings to Most Compatible so the phone captures JPEG in the first place, or export a copy as JPEG from the Photos app and use that. Anything already shared through a messaging app has usually been converted to JPEG on the way out.

Can I do a whole folder at once?

Not here — it handles one file at a time. Because the tool recalculates live, changing the file while leaving the settings alone gives you a run of images at identical settings reasonably quickly. For a genuine batch of dozens, a desktop tool such as ImageMagick or a build-step image pipeline will be faster and will let you script the naming.

Related