Reduce image file size in JPEG, PNG, WebP or AVIF
To reduce image file size, save the image again at a lower quality, in another format or with fewer pixels. This image compressor does that in your browser for one JPEG, PNG, WebP or AVIF image at a time. It then shows the original and the compressed file side by side with their actual sizes.
Compare the result
Preview both images, then choose what to keep.
to preview it here.
No image selected.
to compare the result.
Your result will appear here.
Actual byte savings will appear after compression.
Preview images fit these panels; downloads use the reported dimensions. Each new run starts from the original decoded image.
Details
| Image | Original | Result |
|---|---|---|
| File size | ||
| Dimensions | ||
| Quality | Original |
How to reduce image file size
To compress image size with this online image compressor, choose a file and an output format, then press Compress image. The other settings have defaults you can keep.
- Drag and drop an image on the box, or click the box to choose a file. The page shows the file name, its size and its pixel dimensions.
- Choose a format under Output format. Match input (otherwise PNG) keeps the format of the source file. JPEG, PNG, WebP and AVIF are the other options.
- For JPEG, WebP or AVIF, set the Quality slider. It runs from 0 to 100 and starts at 80. PNG output has no quality slider.
- For JPEG, check the JPEG background color. It fills transparent areas and starts at #FFFFFF, which is white.
- To remove pixels as well, tick Resize image (optional) and type a value in Longest edge (pixels). The default is 1920.
- Press Compress image. Compare the two previews and the byte summary, then choose Download result or Keep original.
What makes an image file smaller
A file gets smaller when it stores less detail or fewer pixels. JPEG, WebP and AVIF are lossy formats, and their Quality slider trades detail for bytes. In the tool's test, a 96 × 64 pixel pattern saved as JPEG took 6,429 bytes at quality 95 and 1,792 bytes at quality 20.
PNG output uses lossless compression. The tool runs the oxipng optimizer at level 2 and has no PNG quality setting. In the same test, a palette PNG went from 164 to 122 bytes with every pixel kept. A PNG saved as PNG without resizing keeps its pixel values, color profile, metadata and animation.
Resizing removes pixels. Resize image (optional) scales the longest edge down and keeps the proportions. No setting guarantees fewer bytes. An image that is already well compressed can grow when you convert it to another format.
How the byte comparison works
When the result is smaller, the summary line gives the saving and its share of the original. The page subtracts the result size from the original size, then divides by the original size. If a 2,000,000-byte image comes out at 500,000 bytes, the summary reads 1.5 MB smaller (75.0% saved). Sizes use decimal units, so 1 MB is 1,000,000 bytes.
When the format and dimensions stay the same, the page offers a new file only if it is smaller. Otherwise it keeps your original bytes. The button then reads Download original, and the Details table says Original unchanged.
A format change or a resize works another way. The page keeps that new file even when it is larger and says how much larger it is. Each new run starts again from the original image.
Limits
This tool compresses one image per run. If you drop several files, the page opens none of them. It has no target file size setting, so it cannot aim for a size such as 100 KB.
Output is JPEG, PNG, WebP or AVIF. There is no GIF, SVG, HEIC or TIFF output. Other raster images your browser decodes, such as GIF, become PNG when Output format stays at Match input (otherwise PNG). In Chrome, SVG files do not open here.
Two results keep the source data: a PNG saved as PNG without resizing, and a kept original. Every other export becomes one 8-bit sRGB still frame without EXIF or GPS data, and HDR or wide-gamut color can change.
Resizing only shrinks an image and never enlarges it. The tool sets no byte or pixel cap. If your browser cannot hold the image in a canvas, the page stops with "Try fewer or smaller files to reduce the memory needed." No result is available to download after failure.
Questions
How do I reduce the MB size of a photo?
Open the photo on this page and pick JPEG, WebP or AVIF under Output format. Lower the Quality slider, press Compress image and read the saving in the summary. If the file is still too big, tick Resize image (optional), enter a smaller Longest edge (pixels) value and compress again.
How can we reduce JPEG file size?
Keep JPEG as the output format and move the Quality slider below the default of 80. Lower quality usually means fewer bytes and less detail, so compare the two previews before you download. If a JPEG saved again at the same dimensions is not smaller, the page gives you the original file back unchanged.
Can you compress an image without losing quality?
Yes, if you save a PNG as PNG without resizing. The oxipng optimizer keeps every pixel value, and the page returns your original if the result is not smaller. To compress photos as JPEG, WebP or AVIF, lower the Quality slider in small steps. A lower value can remove detail, so compare the two previews before you download.
How do I downsize the size of an image?
Tick Resize image (optional) and type the longest edge you want in Longest edge (pixels). The tool scales the image to fit that edge, keeps the proportions and never enlarges a smaller image. The Export line below the resize setting shows the new width and height before you press Compress image.
How do I compress a photo that is too large?
Lower the Quality slider or set a smaller Longest edge (pixels) value, then press Compress image. The page applies no byte or pixel cap to large photos. If your browser cannot hold the source image, the page shows a memory error. Choose a smaller source file to try again.
How can I compress my image?
Choose the image on this page and press Compress image. A web worker in your browser decodes and encodes the image, and the page does not upload it to a server. The tool's browser test fails on any request to another origin or any non-GET request, and it checks that the page's main thread writes nothing to browser storage.