How to Compress Images Without Ruining Them
A photo from a phone is four or five megabytes, which means slow uploads and slow page loads. Compression is not just about dragging a quality slider down - the wrong setting turns text into mush, and resizing usually pays off more than lowering quality.
- Three independent levers control image size - lossy quality, pixel dimensions and encoding format - and each should be judged separately
- Resizing is the most effective lever: halving both dimensions reduces total pixels to a quarter, and the file shrinks to roughly a quarter too
- JPEG quality has a sweet spot at 75-85; below 60 visible blocking appears around text and edges, while above 90 the file grows fast with almost no visible gain
- WebP produces files roughly 25-35% smaller than JPEG at comparable visual quality, though older toolchains may not support it
- PNG is lossless and is required for screenshots, text-heavy graphics and transparency; using it for photographs inflates file size several times over
- Phone photos carry EXIF metadata that can include GPS coordinates accurate to a few metres, which should be removed before sharing
#Three levers, judged separately
Image file size depends on three independent factors, and separating them is how you find the best result.
| Lever | What it does | Cost | When to reach for it |
|---|---|---|---|
| Lower quality | Discards visual detail | Noise and blocking | Photographs, while quality stays above 60 |
| Reduce dimensions | Cuts the pixel count | Blurry when enlarged | When dimensions exceed actual display needs |
| Change format | Uses a more efficient codec | Compatibility risk | When the target platform supports WebP or AVIF |
Work in this order: check the dimensions first, then the format, then adjust quality. A 4000x3000 photo displayed at 800px wide looks far better when resized than when quality is dropped from 90 to 50.
In practice, drop the image into the Image Compressor and move the quality slider - the tool reports the resulting file size as you go, so you can see exactly how size and quality trade off instead of guessing at a value.
#The payoff from resizing is arithmetic
Halving both dimensions reduces the pixel count to a quarter, because area is width times height: 0.5 x 0.5 = 0.25.
| Original | Total pixels | Relative size |
|---|---|---|
| 4000 x 3000 | 12.0 MP | 1.00 (baseline) |
| 2000 x 1500 | 3.0 MP | ~0.25 |
| 1200 x 900 | 1.08 MP | ~0.09 |
| 800 x 600 | 0.48 MP | ~0.04 |
Shrinking 4000px to 1200px keeps roughly 9% of the file size, and on screen the difference is usually invisible, because most display contexts never render that many pixels.
Decide the target size from where the image will actually appear. Inline article images are usually fine at 1200px wide (allowing for 2x displays), thumbnails at 400-600px, and only images meant for zooming need 2000px or more. One look at the intended use saves a lot of quality-slider fiddling.
#The JPEG quality sweet spot
A JPEG quality setting of 75-85 offers the best trade-off. Below 60 you get obvious blocking around text and in gradients. Above 90 the file grows quickly while the visible improvement becomes imperceptible.
For a typical photograph, file size behaves roughly like this:
| Quality | Appearance | Relative size |
|---|---|---|
| 95 | Indistinguishable from the original | 1.00 |
| 85 | Differences visible only on close comparison | ~0.45 |
| 75 | No visible difference at normal viewing | ~0.28 |
| 60 | Text edges begin to soften | ~0.18 |
| 40 | Obvious blocking and noise | ~0.12 |
The only reliable test is to zoom to 100% and inspect the critical region. Charts, UI screenshots and images with small text are more sensitive to quality loss; landscapes and portraits tolerate much more.
Judge the result at the size it will be displayed, not in an image viewer at full zoom. An image that looks clean at an 800px display width does not need three times the file size just to survive a 200% zoom.
#When PNG is mandatory
PNG is lossless, meaning every pixel is preserved exactly, and the price is a larger file. Choosing between PNG and JPEG comes down to content:
| Content | Recommended format | Why |
|---|---|---|
| Photographs | JPEG or WebP | Smooth gradients compress well with minimal visible loss |
| UI screenshots, charts | PNG, or lossless WebP | Flat colour and crisp text produce blocking under lossy compression |
| Transparency | PNG or WebP | JPEG has no alpha channel; transparent areas become black or white |
| Assets edited repeatedly | PNG | Lossless, so repeated edits do not accumulate damage |
| Web images, compatibility permitting | WebP | The smallest file at equivalent quality |
A common trap: saving screenshots as JPEG. Screenshots are mostly flat colour and sharp edges, exactly what JPEG handles worst. The result is a file that barely shrank and text that smeared. Use PNG, or WebP in lossless mode.
Use the Image Converter when you need to change format - it preserves the PNG alpha channel. To hit an exact size or aspect ratio, crop first with the Image Cropper, then compress.
#Strip EXIF before you share
Phone photos embed EXIF metadata by default, including capture time, device model and GPS coordinates that can be accurate to a few metres. You post a picture of your balcony and a stranger can read your address.
Check what is embedded with the EXIF Viewer. The fields that matter:
| Field | Contents | Risk |
|---|---|---|
| GPS latitude/longitude | Capture location | Directly reveals home or frequently visited places |
| Capture timestamp | Accurate to the second | Enables inference about daily routines |
| Device model and serial | Phone brand and model | Useful for device fingerprinting |
| Editing software history | The toolchain used | Exposes your workflow |
Most social platforms strip EXIF automatically, but sending an original photo through a messaging app, uploading to cloud storage, or attaching by email usually preserves it in full. Removing it yourself before publishing is the reliable approach.
#Privacy: local processing versus uploading
Every image tool on this site runs entirely in your browser - images are never uploaded anywhere. You can verify this yourself: open the developer tools network panel, compress an image, and confirm that no upload request occurs.
For images containing contracts, ID documents or internal material, that difference is decisive. A cloud tool means the file has already left your machine.
#Frequently asked questions
#Can a compressed image be restored?
No. Lossy compression discards information permanently, and the compressed file becomes the new original. Archive your source images separately and publish only the compressed copies - never overwrite the original with the result.
#How much does WebP actually save?
At comparable visual quality, lossy WebP is typically 25-35% smaller than JPEG, and lossless WebP is typically 20-30% smaller than PNG. The exact figure depends on content: photographs benefit most, flat-colour graphics less so.
#I set quality to the minimum and the file is still huge. Why?
Because the dimensions did not change. The quality setting only affects how precisely each pixel is encoded; with the same pixel count there is a floor on file size. Reduce the dimensions or switch to WebP - either will help far more than pushing quality lower.
#Does converting to Base64 increase file size?
Yes, always. Base64 encoding enlarges data by about 33%, because binary bytes become printable characters. That makes Base64 suitable only for inlining small icons (under 10 KB); larger images should load as separate files. Use Image to Base64 for the conversion.
#Does batch compression degrade every image?
No - each image is handled independently, and identical settings produce identical results. The real rule is never re-compress an already compressed image: lossy damage accumulates, so a second pass amplifies the artefacts of the first. Always keep an untouched master copy.
Tools used in this guide
Compress JPG, PNG and WebP in your browser with a quality slider (1-100) and …
Open tool →Image ConverterConvert between PNG, JPEG and WebP. Transparency is preserved for PNG and Web…
Open tool →Image CropperCrop images with 1:1 / 4:3 / 16:9 presets
Open tool →EXIF ViewerRead photo metadata: camera, aperture, shutter, ISO, GPS
Open tool →Image to Base64Convert images to/from Base64 DataURL
Open tool →