Free · no signup · never uploaded
Compress Image
Make an image smaller without changing its dimensions. Pick a quality level, or set an exact target file size and we find the best quality that fits.
Drop an image here
or drop your file here.
Nothing is uploaded — it stays on your device.
Runs in your browser — your file is never uploaded.
Add an image, then press "Compress image".
Short answer
To compress an image, drop it below and choose how hard to squeeze it. For a JPG or WebP, pick a quality level or set a target file size in KB. For a PNG, pick a colour budget — PNG is lossless, so fewer colours is the only thing that makes it smaller. Everything runs in your browser, and the real before and after size is shown every time.
Quality level or target file size
Most of the time a quality level is what you want — pick Balanced and a typical photo loses 60–80% of its size with no difference you can see on screen. The encoder throws away the detail your eye is least sensitive to, which is why the saving is so lopsided in your favour.
Target file size is for when something else sets the rule: an upload form that rejects anything over 100KB, or an email cap. Instead of guessing at quality values, the tool encodes at several and keeps the best-looking result that fits under your limit. If your target is genuinely unreachable it says so rather than handing back a ruined image.
Why PNG works completely differently
PNG is a lossless format, and this trips people up constantly. There is no quality slider to turn down, and re-saving a PNG does not shrink it — it can even come out slightly largerthan the file you started with, because a different encoder made different choices. A tool that reported that as “0% saved” would be hiding the truth from you.
What genuinely shrinks a PNG is storing fewer distinct colours. Group the image’s colours into clusters, map every pixel to its nearest one, and the file suddenly contains long repeated runs that PNG’s internal compressor squeezes hard. That is the whole trick behind pngquant and TinyPNG, and it is what the colour-budget control here does. Transparency is preserved throughout.
Compression is not resizing
Compressing changes how the pixels are stored; resizing changes how many pixels there are. A 4000 × 3000 photo stays 4000 × 3000 here no matter how hard you compress it. When you need a dramatic reduction — a camera original headed for a web page — do both: resize it down to the dimensions you will actually display, then compress the result.
Compress by format
- Compress a JPG — quality levels and target file size.
- Compress a PNG — colour reduction, transparency kept.
- Compress to 100KB — for upload forms with a hard limit.
- Compress for email — get under the attachment cap.
Compression settings and what they cost
| Setting | Quality value | What it does |
|---|---|---|
| Smallest file (JPG / WebP) | 50% | Visible softening — best for thumbnails |
| Balanced (JPG / WebP) | 70% | Big savings, hard to tell apart |
| High quality (JPG / WebP) | 85% | Near-original, moderate savings |
| Maximum (JPG / WebP) | 92% | Barely lossy — smallest savings |
| 256 colours (PNG) | 256 colours | Near-identical to the eye |
| 128 colours (PNG) | 128 colours | Slight banding in smooth gradients |
| 64 colours (PNG) | 64 colours | Visible banding, strong saving |
| 32 colours (PNG) | 32 colours | Poster-like — flat areas only |
JPG and WebP shrink by lowering quality — the encoder discards detail your eye is least likely to miss. PNG has no quality setting at all: it is lossless, so the only way to make one smaller is to store fewer distinct colours. That is why the PNG control is a colour budget rather than a percentage.
How we calculate this
Compression runs locally in your browser — here is exactly how:
- Decode. your image is decoded to a bitmap with createImageBitmap and drawn to a canvas — never uploaded to any server.
- Choose the lever. JPG and WebP are lossy, so they shrink by lowering the encoder's quality value. PNG is lossless and ignores quality entirely, so it shrinks by reducing how many distinct colours it stores.
- Reduce. for PNG, a median-cut algorithm groups the image's colours into clusters and maps every pixel to its nearest cluster average — the same approach pngquant uses. Fewer colours means longer repeated runs, which is what DEFLATE (PNG's internal compressor) squeezes. Alpha is copied through untouched so soft edges stay soft.
- Hit the target. in target-size mode we binary-search the quality value, encoding at most seven times and keeping the highest quality whose output still fits. If even the lowest usable quality overshoots, you get that smallest version and a message saying the target was not reachable.
- Encode. the canvas is exported with canvas.toBlob and handed straight to a download link.
Assumptions
- Everything runs client-side; large images are limited only by your device's memory.
- Re-compressing an already-compressed JPG loses a little more detail each time — always work from the original.
- A PNG kept at its original colours is re-encoded losslessly and may come out the same size or slightly larger. The tool reports that honestly rather than claiming a saving.
- Dimensions are never changed — compression alters how the pixels are stored, not how many there are.
Sources
Last reviewed: July 21, 2026
Frequently asked questions
Are my images uploaded anywhere?+
No. The image is decoded, compressed, and re-encoded entirely inside your browser tab using the canvas API. Nothing is sent to a server, which is why it still works with your network disconnected.
How much smaller will my image get?+
For a photo saved at full quality, dropping to the Balanced setting typically saves 60–80% with no difference most people can see. An image that has already been compressed once will save far less, because the detail that compresses easily is already gone. The tool shows the real before and after size every time, so you never have to guess.
Does compressing change the image dimensions?+
No. Compression changes how the pixels are stored, not how many there are — a 4000 × 3000 photo stays 4000 × 3000. If you want fewer pixels as well, resize the image first and then compress it; that combination gives by far the biggest savings.
Why did my PNG get bigger instead of smaller?+
Because PNG is lossless. Re-saving a PNG at its original colours cannot throw anything away, and a different encoder can easily produce a slightly larger file than the one you started with. To actually shrink a PNG you have to reduce its colour budget — pick 256 or 128 colours and it will drop sharply. The tool tells you plainly when a file did not get smaller rather than reporting a fake saving.
What does 'compress to a target size' do?+
It searches for the best quality that still fits your limit. Rather than guessing, it encodes the image a handful of times at different quality values and keeps the highest one whose result is under your target. If your target is impossible — say 20 KB for a huge photo — you get the smallest usable version instead, with a message saying the target was not reached.
Is compression reversible?+
Not for JPG or WebP. Those are lossy formats: the discarded detail is gone for good, and no tool can restore it. Keep your original file if you might need it later. Reducing a PNG's colours is likewise permanent in the exported file, though your source PNG on disk is never modified.
Which format should I compress to?+
Keep photographs as JPG and graphics with sharp edges or transparency as PNG — this tool keeps whatever you drop in. If you control the website where the image will be used, converting to WebP usually beats both at the same visual quality.
Related tools
Images are compressed entirely in your browser and never uploaded. JPG and WebP compression is lossy and cannot be undone, so keep your original file if you may need it later.