The compressor shows each file before and after with the percentage saved, lets you compare the two side by side, and gives you a download per file or all of them in one ZIP. It is handy when a job application portal, a school form or an email provider rejects anything over a few megabytes. Your images never leave your device: the work happens in this browser tab and nothing is uploaded.
How it works
Each file is decoded by your browser with createImageBitmap, which also turns phone photos upright using their EXIF orientation tag. If you set a maximum width and the image is wider, it is scaled down with its proportions kept. Large reductions are done in halving steps with high quality smoothing, because one big jump would skip pixels and leave jagged edges. The image is then saved again with the browser's own JPEG or WebP encoder at the quality you chose, from 10 to 95 (75 by default). The quality number controls how much fine detail the encoder may throw away: lower numbers give smaller files and, eventually, visible blocks. A JPEG stays a JPEG and a WebP stays a WebP. PNG is lossless, so by default it stays PNG and only gets smaller when it is resized. You can instead turn PNGs into WebP, which keeps transparency, or JPG, which puts a white background behind transparent areas. BMP and HEIC files are saved as JPG, and GIF as PNG (only the first frame of an animation). If the new file is not smaller than the original, the tool keeps the original and labels it, so you never download a "compressed" file that weighs more. Saving through the canvas also drops metadata such as the camera model and GPS location. Sizes are shown in decimal units, where 1 kB is 1000 bytes and 1 MB is 1,000,000 bytes, as on a Mac or a phone.
Worked example
Say you want to attach a phone photo to an online form that accepts files up to 1 MB. The photo is 4032 by 3024 pixels and weighs 3.48 MB. You set the quality to 75 and the maximum width to 1920. The width is more than twice 1920, so the tool first halves the image to 2016 by 1512, then makes one last step to 1920 by 1440, keeping the 4:3 shape. The browser then encodes it as a JPEG at quality 75. If the result is 612 kB, the list shows 3.48 MB → 612 kB and 82.4% smaller: 3,482,112 bytes minus 612,000 bytes is 2,870,112 bytes saved, and that divided by the original size is 0.824. The file is saved with "-compressed" added to its name, and it now fits the form with room to spare.