Image Compressor
Shrink JPG, PNG and WebP in the browser — quality is adjustable, not lossless — free, private and running entirely in your browser
Reduce the file size of PNG, JPEG, and WebP images in the browser. Drop or pick several at once, up to 25 MB each. Images are never uploaded, and nothing is kept after you leave.
Last updated: 15 October 2026
Guide, examples, and FAQ
About Image Compressor
What it does
browser-image-compression 2.0.2 re-encodes each file in a Web Worker served from this site, so the compress step makes no third-party request. JPEG and WebP are lossy at the quality you set. PNG is re-encoded with a reduced color palette (4,096 times that quality), so it is not bit-identical, and a photo kept as PNG may not shrink. EXIF metadata is not kept.
Who it is for
For anyone who needs a smaller PNG, JPEG, or WebP before sending or publishing it.
When to use it
Use it when the job is a smaller file of the same picture. It does not crop. GIF, SVG, and AVIF are rejected, and animation is not kept.
Key features
Add images
Drop or use the file picker. Several files at once. PNG, JPEG, and WebP only, up to 25 MB each. No limit on how many files.
Mode and format
Max quality is 92 with no resize. Balanced, the default, is 75 with the longest side limited to 4,096 px. Max compress is 45 with the longest side limited to 2,048 px. The slider runs from 1 to 100; moving it selects Custom and keeps the last mode’s resize limit. The resize rule is shown next to the buttons. Output is Auto (keep the input format), JPEG, PNG, or WebP.
Download
Preview before and after. Download one file as <name>-compressed.<ext>, or Download all as separate files. There is no zip. Copy file info writes the name, dimensions, and sizes. Remove one item, or Reset to clear the queue.
How to use Image Compressor
- 1Drop PNG, JPEG, or WebP files, or pick them. A GIF or SVG is named and rejected; the others still load.
- 2Leave Balanced, or pick Max quality or Max compress. Move the slider if you want Custom.
- 3Pick Auto, JPEG, PNG, or WebP. Read the size next to each file.
- 4Download <name>-compressed.<ext>. The queue stays in memory for this visit only.
Example
Before
Synthetic test images, library 2.0.2, quality 0.75, longest side 4,096. photo.jpg is 52,313 bytes. photo.webp is 57,192 bytes. alpha.png, a PNG with transparency, is 1,795 bytes.
After
photo.jpg is 33,111 bytes. photo.webp is 38,658 bytes. The same photo.jpg saved as PNG is 13,973 bytes. alpha.png kept as PNG is 1,422 bytes, and the transparent pixels stay transparent.
These are test images. Real photos behave differently. A separate alpha.png converted to JPEG grows from 1,384 to 6,332 bytes and loses transparency. A 2,400×800 JPEG at quality 0.45 with a 2,048 px limit goes from 1,435,863 to 322,311 bytes and 2,048×682 px. In the browser, a transparent PNG went from 279 to 785 bytes as JPEG and showed both “Larger than the original” and “Transparent areas become white in JPEG”.
Common problems and fixes
The file is a GIF or SVG
It is listed by name: “GIF and SVG aren’t supported here — use PNG, JPG, or WebP.”
The file is another type
It is listed by name: “This file type isn't supported. Use PNG, JPG, or WEBP.”
A file is over 25 MB
It is listed by name: “File exceeds the 25 MB limit.”
The output is larger
That item shows “Larger than the original”. The library’s retries do not guarantee a smaller file.
Benefits
The worker stays on this site
Compression runs in a Web Worker loaded from /vendor/browser-image-compression.js. The image is not sent to another host.
A larger result is labeled
If that item’s output is bigger than its input, the row says “Larger than the original”. A transparent PNG set to JPEG also says “Transparent areas become white in JPEG”.
Common use cases
A photo to attach
Add the JPEG or WebP, leave Balanced or lower the slider, and download the new file.
A PNG that must stay transparent
Leave the output on Auto or PNG. JPEG fills the transparent areas with white.
Tips & best practices
- There is no target-size control. If the first result is larger than the original, or larger than 20 MB, the library retries at a lower quality, up to 10 times. A first result over 20 MB can also be scaled down. The file can still be larger than the original.
- Max quality does not resize. Balanced caps the longest side at 4,096 px. Max compress caps it at 2,048 px. Custom keeps whichever of those you used last.
Common mistakes to avoid
- Converting a transparent PNG to JPEG. Transparent areas become white, and the file can grow.
- Expecting a PNG photo to shrink the way a JPEG does. PNG is a reduced palette, not a bit-identical copy, and it may not shrink.
- Compressing the same JPEG again and again. Each pass can add visible artifacts.
- Using Max compress when the picture needs to stay large. That mode limits the longest side to 2,048 px.
- Expecting EXIF metadata or location tags to remain. They are not kept.
Frequently asked questions
Which files can I add, and how many?
PNG, JPEG, and WebP, several at once, up to 25 MB each. There is no file-count limit. GIF and SVG are rejected by name. AVIF gets the unsupported-type message. Animation is not kept.
What do the modes and the slider do?
Max quality is 92 with no resize. Balanced is 75 and limits the longest side to 4,096 px. Max compress is 45 and limits the longest side to 2,048 px. The slider runs from 1 to 100. Moving it selects Custom and keeps the last mode’s resize limit. The page shows that rule next to the buttons.
What happens to transparency, PNG, and EXIF?
JPEG and WebP are lossy at the chosen quality. PNG uses a smaller color palette, so it is not bit-identical. Converting to JPEG fills transparent areas with white. EXIF metadata is not kept.
Are the images uploaded, or kept after I leave?
No. The work runs in the browser, in a worker from this site. Images are never uploaded. Nothing is kept after you leave. The queue is in memory only.
How do I save the result?
Download saves <name>-compressed.<ext>. Download all saves each file on its own. There is no zip. Copy file info copies the name, dimensions, and sizes. Reset clears the queue.
What does Auto output mean?
Auto keeps the same format as the file you added (PNG stays PNG, JPEG stays JPEG, WebP stays WebP). Pick JPEG, PNG, or WebP to force a different format.
Can I set a target size in kilobytes?
No. There is no target-size box. Use Balanced, Max compress, or the quality slider. If the first result is still large, the page may retry at a lower quality, but the file can still end up larger than the original.
Does Download all create one archive?
No. Download all saves each compressed file separately. There is no zip download.
When another tool fits better
- Crop Image. The file is large because of extra area. This page re-encodes the whole picture.
- Convert Image. The file is a GIF or SVG. This page rejects those.
Conclusion
Image Compressor reduces PNG, JPEG, and WebP files in the browser. The output is not guaranteed to be smaller, metadata is not kept, and a transparent PNG turned into JPEG loses that transparency.
Ready to try Image Compressor?
Scroll back up to start now, or continue with another free image tool.