Webz Tools
Menu

Image Compressor

Large images slow pages down and run into upload limits on forms, email and content systems. The Image Compressor makes JPG, PNG and WebP files smaller in your browser, one at a time or in a batch of up to 20, without sending them to a compression server.

Every image keeps its own format and its exact pixel dimensions: a JPG stays a JPG, a PNG stays a PNG and a WebP stays a WebP. JPG and WebP files are re-encoded at the quality you choose. PNG files are optimized losslessly, so not one pixel changes. You see the before and after size of each file, then download them one by one or as a ZIP.

Runs in your browser. Image Compressor processes your input on your own device. Nothing you enter or upload is sent to a server.

Did this tool help you? ☕

WebzTools is free to use. If this tool saved you some time, you can support the project with a coffee and help us keep improving the tools.

Buy Me a Coffee (opens in a new tab)

How to use the Image Compressor

  1. Drop up to 20 JPG, PNG or WebP images onto the upload area, or click it to choose files. Each file is checked by its contents, not just its name.
  2. Set the JPG and WebP quality. The default is 80, and lower values give smaller files. PNG files ignore this setting because they are optimized without losing any detail.
  3. Select Compress Images. Images are processed one at a time with a progress count, and you can cancel at any time.
  4. Check the size change shown for each file, then download the images one by one or select Download All (.zip).

Supported formats: JPG, JPEG, PNG and WebP input, up to 20 files per batch and 50 MB each. The output keeps each file's format; animated images and HEIC are not accepted.

What image compression does

An image file is a description of millions of pixels. Compression stores that description in fewer bytes, either by finding patterns it can write more compactly or by deliberately dropping detail the eye is unlikely to miss. The result is a file that downloads faster, fits an upload limit and takes less storage, while the picture stays the same size.

How much a file shrinks depends mostly on what is in it. Photographs full of texture and noise leave less room than flat graphics, and an image that has already been compressed once has less left to give.

Compress JPG, PNG and WebP

The three formats are compressed in three different ways, which is why the tool does not give them one shared setting.

To compress a JPG or to compress a WebP, the tool re-encodes the picture at the quality you choose, which is why those two have a quality slider. To compress a PNG, it rewrites the same pixels more efficiently, which is why a PNG has no quality setting at all.

FormatHow it is compressedWhat changesTransparency
JPG / JPEGRe-encoded by your browser at the quality you chooseSome fine detail, and the file's metadataNone; JPEG has no transparency
PNGOptimized losslessly in a background workerNothing in the picture; the file stores the same pixels more efficientlyKept exactly
WebPRe-encoded by your browser at the quality you chooseSome fine detail, and the file's metadataKept where the source has it

Lossy vs lossless compression

Lossy compression permanently discards some detail in exchange for a much smaller file. JPG and WebP use it here. The loss cannot be undone, and compressing the same file again discards more, so keep the original when you may need the best copy later.

Lossless compression stores exactly the same picture in fewer bytes, the way a ZIP file does for documents. PNG is lossless by design, and this tool only ever optimizes PNG losslessly. The savings are usually smaller than lossy compression gives, but nothing is lost.

JPEG quality explained

The quality slider runs from 10 to 100 with a default of 80. It controls how aggressively a JPG or WebP is compressed. It is not a percentage of the original size, and it is not a promise of a particular file size: two photos at the same setting can end up very different sizes.

QualityWhat to expectSuits
90 to 100Closest to the original, with the least saving and sometimes no savingImages you will edit again or print
70 to 85A good balance: a clear saving with differences that are hard to notice at normal sizePhotos for websites, email and documents
40 to 65Much smaller files; blocky patches and blurred edges start to appear in gradients and fine detailThumbnails and previews where size matters most
Below 40Visible damage to most photosRarely a good idea

How PNG lossless optimization works

A PNG stores its pixels with a filter and a general-purpose compressor. Optimizing it means trying other filter choices and a stronger compression pass, and using a smaller way to store the colors when the image allows it, for example a palette for an image with few colors. The picture that comes out is identical, pixel for pixel, including the transparency and the colors hidden under fully transparent pixels.

This is slower than re-encoding a JPG, because the optimizer tries many combinations. A large PNG can take a minute or more, and the tool shows a note when it expects that. It runs in a background worker, so the page stays usable, and you can cancel at any time. The tool uses one fixed optimization level, because a slower setting saved well under one percent more in testing for several times the wait.

WebP compression

WebP is a modern format that usually makes a smaller file than JPG at similar quality and supports transparency. This tool re-encodes WebP images with your browser's own WebP encoder at the chosen quality and keeps their alpha channel. If a browser cannot produce a real WebP image, the tool reports an error instead of saving another format under a .webp name.

Two cases can make a WebP larger. A lossless WebP is re-encoded as a lossy one, which can be bigger for small or flat images, and the highest quality settings can switch some browsers to lossless encoding, which is much bigger than a normal lossy file. For smaller WebP files, keep the quality below 100.

Compression vs resizing

Compression keeps every pixel position and changes how the file stores them. Resizing changes how many pixels there are. A 4032 × 3024 photo compressed here is still 4032 × 3024, which is why this tool has no width, height or scale setting.

If a destination demands specific dimensions, use the Image Resizer. If the dimensions are already right and the file is too big, compress it here. For the two together, resize first and compress the result.

Phone photo, JPG

Input

4032 × 3024 JPG at quality 80

Output

A JPG that is still 4032 × 3024 and the right way up, usually much smaller

Logo with transparency, PNG

Input

1200 × 800 PNG

Output

A PNG that is still 1200 × 800 with identical pixels and the same transparency, never larger than the original

Compression vs format conversion

This tool never changes a file's format, even when another format would be smaller. A PNG is not turned into a WebP and a WebP is not turned into a JPG behind your back. If you want a different format, use the Image Converter, which changes the format and keeps the pixel dimensions.

The JPEG Compressor is a separate, specialized tool: it takes one image at a time, always outputs a JPEG even from a PNG or WebP source, and offers scaling and a target file size. Use it for that workflow. Use this tool for batches that must keep their formats and dimensions.

Why an optimized file can sometimes be larger

Re-encoding a JPG or WebP always writes a new file at the quality you picked. If the original was already compressed harder than that, for example a web image saved at a quality below your setting, the new file stores more detail than the old one and can be bigger. The tool reports that honestly, for example 12% larger, and suggests a lower quality, instead of calling it a saving.

A PNG cannot get larger: the tool compares the optimized file with the original (with the same metadata removed) and keeps the smaller one.

Image metadata and privacy

Photos can carry EXIF details such as the camera model, the capture time and the GPS location. JPG and WebP files made here are encoded from decoded pixels by your browser, which does not copy that information, so they are safe to share without leaking where a picture was taken. PNG files are rewritten without text notes, modification times and EXIF data.

What is kept is whatever changes how the picture looks: for a PNG that means transparency, color profile information, gamma, background color and print density, and a rotation stored in a PNG's EXIF is kept as a new orientation-only record, with every other EXIF field removed. A JPG's rotation flag is applied to the pixels instead of being kept, so the result is upright without depending on any tag. Color profiles can be rewritten or removed when a browser re-encodes JPG and WebP, so this tool is not for professional color-managed workflows.

Batch compression

Images are compressed strictly one at a time, with a Compressing 3 of 8 count, which keeps memory use predictable and makes Cancel immediate. One damaged file does not stop the rest: the summary reports how many were compressed and how many failed.

Each finished image has its own download button. A batch with more than one finished image can also be downloaded as compressed-images.zip, built only from the results on screen when you select it. Output names add -compressed to the original name and keep its format, and duplicates become photo-compressed.jpg, photo-compressed-2.jpg and so on, so nothing in the ZIP overwrites anything else.

Choosing the right setting

  • Photos for a website or email: start at the default of 80 and check the result. Go lower only if you still need a smaller file.
  • Images you will keep editing: keep the original, and use a quality of 90 or more if you must re-encode.
  • Logos, screenshots and graphics with sharp edges or transparency: PNG, which is optimized without any loss. For flat graphics this is often a large saving.
  • A file that came out larger: lower the quality, or keep the original, since it was already well compressed.
  • A file that is still too big after compressing: resize it with the Image Resizer, or turn several into one document with Image to PDF.

Things worth knowing

  • JPG and WebP compression is lossy. Detail that is discarded cannot be recovered, and a result can be larger than the original if the original was already compressed harder than your quality setting.
  • Only JPG, PNG and WebP are accepted. HEIC photos need the HEIC to JPG Converter first; GIF, AVIF, SVG, BMP and TIFF files are not supported.
  • Animated WebP and animated PNG files are refused, because compressing them here would keep only the first frame.
  • Pixel dimensions are preserved, not changed. This tool does not resize, crop or rotate; use the Image Resizer for a different size.
  • The format is preserved too. Use the Image Converter to change it.
  • Up to 20 images per batch, 50 MB per image and about 50 megapixels per image (a 48 megapixel phone photo fits). Larger files are refused with a message.
  • Metadata is removed from JPG and WebP files, and color profiles can be rewritten or removed. Do not use this for professional color-managed work.
  • Very large images can still exceed what your browser's memory allows, particularly on phones, and some mobile browsers limit the size of the canvas used to re-encode JPG and WebP.
  • Lossless PNG optimization of a large image can take a minute or more.

Frequently asked questions

How do I compress an image?

Drop your JPG, PNG or WebP files onto the upload area, leave the quality at 80 or change it, select Compress Images and download the results. Nothing is installed and no account is needed.

Can I compress JPG, PNG and WebP?

Yes, all three, including a mix of them in one batch. Each file comes out in the format it went in. HEIC, GIF, AVIF, SVG, BMP and TIFF files are not accepted.

Does compression change image dimensions?

No. The width and height in pixels stay exactly the same, and a photo that is stored sideways with a rotation flag comes out upright at the same displayed size. To change the dimensions, use the Image Resizer.

Does image compression reduce quality?

For JPG and WebP, yes: they are re-encoded with lossy compression, so some fine detail is discarded. At the default quality of 80 the difference is usually hard to see at normal viewing size, and higher values keep more detail in a larger file. PNG files are the exception, because they are optimized without losing any detail.

Is PNG compression lossless?

Yes. PNG files are optimized with a lossless optimizer, so every pixel, including its transparency, decodes to exactly the same value as before. The file just stores the same pixels more efficiently. Quality does not apply to PNG, and the quality slider has no effect on it.

Can I compress several images at once?

Yes, up to 20 per batch, one after another with a count such as Compressing 4 of 12. A file that cannot be compressed does not stop the others, and a batch of two or more finished files can be downloaded as one ZIP.

Why did my compressed image become larger?

A JPG or WebP that was already compressed hard, or saved at a lower quality than the setting you chose, can grow when it is re-encoded. The tool shows the real result, for example 12% larger, rather than hiding it. Choose a lower quality for a smaller file, or keep the original. A PNG is never made larger by this tool.

Does compression remove metadata?

Mostly, and it depends on the format. JPG and WebP files are re-encoded by your browser, which does not copy EXIF, GPS or camera details. PNG files lose text notes, modification time and EXIF data, except that a stored rotation is kept as a minimal orientation-only record with nothing else from the EXIF block. They also keep the information that affects how the picture looks, such as transparency, color profile and print density. Color profiles can be rewritten or removed when a browser re-encodes JPG and WebP.

Are my images uploaded?

No. Your images are compressed in your browser and are not uploaded for compression. The first time you compress a PNG, your browser downloads the PNG optimizer from this site (about 160 KB) and runs it on your device in a background worker. That download contains none of your images.

What is the difference between compression and resizing?

Compression makes the file smaller and keeps the pixel dimensions. Resizing changes the dimensions, which usually makes the file smaller too, but it throws away pixels. This tool never resizes. Use the Image Resizer when a form or template asks for specific dimensions.

What is the difference between Image Compressor and Image Converter?

The Image Compressor makes a file smaller and keeps its format. The Image Converter changes the format (JPG, PNG or WebP) without aiming for a smaller file. The JPEG Compressor is a single-image tool that always outputs a JPEG and adds scaling and a target file size.

Can I compress HEIC images?

Not directly. Use the HEIC to JPG Converter first to turn an iPhone HEIC photo into a JPG, then compress the JPG here if you need it smaller.

Can I compress an animated image?

No. Animated WebP and animated PNG files are refused with a message. Compressing them here would keep only the first frame, which would silently turn an animation into a still picture. GIF files are not supported.

Why was a file refused?

The usual reasons are a file that is not really a JPG, PNG or WebP (the tool reads the contents, so a JPG renamed to .png is refused), a damaged or cut-off file, an animated image, a file over 50 MB or about 50 megapixels, or a browser that ran out of memory. The tool shows the reason next to the file, and the other files in the batch are still compressed.

Browse all image tools