The image compressor on this page re-encodes a JPG, PNG or WebP at a quality you choose and shows the new file size straight away, so you can find the point where the file is small enough without the picture looking worse. It runs in your browser and nothing is uploaded.
Photos exported straight from a phone or camera are often several megabytes, far more than a web page needs. This tool makes the fix a ten-second job without design software or a subscription.
What This Image Compressor Does
When you choose an image, the tool reads its file size and pixel size, picks an output format (PNG if you uploaded a PNG, JPG for anything else), and compresses at once. It then recompresses each time you move the quality slider, change the format or toggle the dimension cap. The page shows one preview, of the compressed result, plus the original and compressed sizes and the percentage saved. If the new file is not smaller, Saved shows 0% rather than a negative number.
- Quality slider (0.1 to 1.0). Applies to JPG and WebP. It has no effect on PNG, which is lossless.
- Cap maximum dimension. Scales the longest side down to the number you enter and keeps the aspect ratio. It never enlarges an image.
- Output format. JPG, WebP or PNG. The file downloads as compressed-image.jpg, .webp or .png.
How to Use the Image Compressor
- Upload an image. Use the file field or drop a file on the dashed zone.
- Check the output format. JPG or WebP for photos. PNG only if you need lossless output or transparency.
- Move the quality slider and watch the compressed size and Saved percentage change.
- Optionally cap the dimension if the image is also larger than its final use needs.
- Compare the preview, then click Download Compressed Image.
How to Read the Result
- Original size and Compressed size are file sizes in KB, or MB above 1 MB (1 MB here is 1,048,576 bytes).
- Saved is 1 minus compressed divided by original, rounded. A low number on an already-optimised JPG is normal, because re-encoding a file that was compressed once gives little more to remove.
- Dimensions show the output size in pixels. They equal the original unless the cap is on and the image is larger than the cap.
- The preview is the encoded file itself, so artifacts you see there are in the download.
Pixel arithmetic for the dimension cap, using a 4032 × 3024 phone photo (12.2 megapixels) as an example:
| Input | Output | Share of original pixels |
|---|---|---|
| 4032 × 3024, cap off | 4032 × 3024 | 100% |
| 4032 × 3024, cap 1920 | 1920 × 1440 | 22.7% (2,764,800 of 12,192,768) |
File size does not fall in exact proportion to pixel count, but a cut to under a quarter of the pixels usually shrinks the file far more than a small quality change would.
Starting Settings to Test
These are starting points to try on your own images, not guaranteed results. Every image compresses differently.
| Image type | Format to try | Quality to start at | Why |
|---|---|---|---|
| Photo with texture (foliage, fabric, skin) | JPG or WebP | 0.6 to 0.8 | Texture hides artifacts |
| Smooth gradient or sky | JPG or WebP | 0.8 to 0.9 | Banding shows first in smooth areas |
| Screenshot, logo or text | PNG | Not used | Lossy formats blur sharp edges |
| Needs transparency | PNG or WebP | PNG ignores it; WebP uses it | JPG has no transparency |
Lossy vs. Lossless Compression
JPG and lossy WebP discard detail the eye is less likely to notice, and the loss is permanent. If you compress at 0.5 and re-save at 0.9, the detail is not restored. This is generation loss, so always compress from the original file. PNG is lossless: it stores the exact pixels, so repeated saves lose nothing, but photographs shrink far less in PNG than in JPG or WebP. MDN's guide to image file types covers the trade-offs.
Google's WebP page says lossy WebP images are 25-34% smaller than comparable JPEG images at equivalent SSIM quality. That is a comparison at equal measured quality, not at the same slider number, so compare the preview rather than assuming 0.7 in WebP looks like 0.7 in JPG.
Image Weight and Page Speed
Largest Contentful Paint (LCP) is the time until the biggest visible element renders, often a hero photo. Google's guidance on web.dev is to aim for an LCP of 2.5 seconds or less for at least 75% of page visits. A multi-megabyte hero image can make that hard on a slow connection.
Smaller files are not a guaranteed LCP fix, though. Google's guide to optimising LCP notes that shrinking a file only helps when the download is the slowest part of the load; if the delay comes from the server or from late discovery of the image, a smaller file moves the time somewhere else. Measure your page first, then compress. Separately from search, a lighter image loads faster on mobile data and older devices.
Privacy and Browser Limits
Many online compressors upload your file to a server. This one encodes in your browser with the Canvas API, so the file stays on your device and the tool keeps working if you go offline after the page loads. Limits to know:
- Very large images can exceed what your browser's canvas can hold, in which case you will see "Could not process this image".
- Re-encoding through a canvas drops metadata such as EXIF camera and location data. That is useful for privacy but means the output does not carry it.
- If your browser cannot encode the format you chose (WebP in an older browser), it falls back to PNG, so check the downloaded file extension.
- JPG has no transparency, so transparent areas of a PNG converted to JPG are filled with white. Keep PNG or WebP for cut-outs that must stay transparent.
What to Do Next
- Resize first if the image is much larger than its slot. The Image Resizer or the dimension cap above does this.
- Crop away unneeded edges with the Image Cropper before compressing.
- Convert photographic PNGs with the PNG to JPG Converter or the WebP Converter if you need that route.
- Keep an untouched copy of the original so you can re-export later at a different size.
- After uploading to your site, test the page's LCP before and after, rather than assuming the saving helped.
Common Mistakes to Avoid
- Recompressing an already-compressed JPG repeatedly. Each lossy pass removes more data.
- Using low-quality JPG for logos or text screenshots. Edges turn fuzzy.
- Ignoring pixel dimensions. An oversized image at high quality is still much bigger than a right-sized one at moderate quality.
- Pushing quality so low that skies and gradients band. Back off when you see blotchy steps.
- Comparing WebP and JPG by slider number. They use different encoders, so compare the preview.
Arb Digital builds websites and can set up image resizing and modern formats as part of a build, so editors do not need to optimise every upload by hand. Reply within 1 business day.
See Web Design Services All Free ToolsRelated Free Tools From Arb Digital
Pair this with the Image Resizer, the Image Cropper, the PNG to JPG Converter and the Image File Size Calculator for planning sizes before you export. Browse the free online tools hub for more.
Frequently Asked Questions
There is no single best value. For most photographs, 0.6 to 0.8 is a reasonable starting range. Lower it while watching the preview and stop before you see blockiness or banding.
No. Compression runs in your browser with the Canvas API. The image is not sent to a server.
If the PNG is a photograph without transparency, output JPG or WebP instead. PNG's lossless compression cannot match lossy formats on photos, so the file is usually much smaller.
Each lossy pass loses more quality permanently and removes progressively less size. Compress once from the original at your target quality instead.
WebP uses a more efficient encoder. Google reports lossy WebP files 25-34% smaller than comparable JPEGs at equivalent SSIM quality, and current major browsers support it.
Yes. PNG output and WebP output both keep transparency. JPG does not; transparent areas are filled with white. PNG saves far less size than WebP or JPG on photos.
This tool runs in your browser. Your images are not uploaded, stored or sent to any server.