Skip to main content
ToolMaple

Image Compressor

Shrink JPG, PNG or WebP images by quality and width, entirely in your browser.

Last updated:

Drag images here, or choose files

Up to 50 images at a time, 10 MB per file

No images selected yet

What image compression actually does

Compression is re-encoding. The image is drawn onto a canvas at the width you ask for and saved again at the quality you choose, which produces a genuinely smaller file. That is why the two things people usually try instead do nothing at all: dragging a photo smaller inside a document or a slide deck only changes how it is displayed, and renaming a file from .png to .jpg only changes the label. The pixel data on disk is identical in both cases. Two things really shrink a file: throwing away resolution you were never going to use, and letting the encoder discard detail your eye cannot pick out.

Where it pays off:

  • Page speed. On most pages the largest image is the Largest Contentful Paint element, so every kilobyte you remove from it is time the visitor does not spend waiting.
  • Social posts. Platforms cap the dimensions they will display and re-encode anything larger, so uploading a 4000 pixel wide photo wastes your upload and hands the platform a decision you could have made yourself.
  • Email attachments. Mailbox providers commonly cap a message at around 25 MB including encoding overhead, and a handful of phone photos passes that easily.
  • Storage and mobile data. Smaller files mean more room in a cloud plan and less data burned when someone opens your page on a phone.

Which output format to pick

  • JPG: the safest choice for photographs. Lossy, but at 80 percent quality the difference is hard to see on a normal screen, and everything that opens images can read it.
  • WebP: Google reports lossy WebP files are about 25 to 34 percent smaller than comparable JPEG files, and it supports transparency. The default choice for the web if you do not have to support very old software.
  • PNG: lossless and keeps a transparent background. Right for logos, icons, diagrams and screenshots of flat colour; wrong for photographs, where it will usually be the biggest of the three.

Settings worth starting from

UseFormatQualityMax width
Photo on a pageWebP80%1920px
Social postJPG85%1080px
Email attachmentJPG75%1600px
Logo or iconPNGn/aOriginal

These are starting points, not rules. Photographs with a lot of fine texture, such as foliage or fabric, show artefacts sooner and want a higher quality number; flat illustrations survive much lower settings. Check the result at full size before you commit to a batch of a hundred.

How to compress a batch of photos

  1. Set the quality, the output format and the maximum width first. The settings are applied at the moment an image is added.
  2. Drag the whole batch onto the upload area, or use the file picker and select several files at once. Anything over 10 MB is skipped with a notice; more than 50 files at once only warns you that it may be slow.
  3. Wait for the progress counter. Each file is processed on its own, so one that cannot be read is marked as failed on its row while the rest carry on.
  4. Read the saved total above the list to judge whether the settings are right. Change the quality, the width or the format and the images already in the list are compressed again with the new settings, so there is no need to clear and re-pick them.
  5. Download the rows you want one at a time, or press Download all as ZIP to take the whole batch in one file.

How to get a photo under a size limit

A form, a submission system or a client mailbox gives you a ceiling, say 2 MB per image. There is no automatic mode that hits a target size, but this order gets there in two or three tries:

  1. Change the maximum width first. It has by far the largest effect, and most uses need nowhere near the original resolution: 1920px is plenty for a full width image on a page, and 1600px is generous for a document or a form.
  2. Choose JPG or WebP. A photograph saved as PNG is almost always bigger than either.
  3. Start the quality at 80 percent and step down by about 10 percent at a time, watching the compressed size in the list. Below roughly 50 percent the blocking usually becomes visible.
  4. Let the list finish re-compressing before you download. The file extension follows the format the browser actually produced, so you will not end up with JPG data in a file named .webp.
  5. If it still will not fit, the original is probably very large, for example a 4000 pixel wide phone photo. Go back to step one and cut the width again.

Getting the compressed files where you need them

  • One file at a time: the download button on each row saves it as original-name-compressed.ext, so the original is never overwritten and you can keep both side by side to compare.
  • The whole batch: Download all as ZIP packs every successful row into toolmaple-compressed-date.zip. Duplicate names are numbered automatically, so nothing inside the archive overwrites anything else.
  • Attaching or uploading: unzip and drag the files straight into your mail client, a form or a cloud drive. On a phone the download lands in the system Downloads folder, and you pick it from there in the upload dialog.
  • Changing format rather than size: if you only need JPG to PNG or PNG to WebP, use the image converter. To embed an image directly in CSS or HTML source, use image to Base64.
  • Close the tab and it is gone: the list and the compressed results live only in this tab. A refresh means compressing again, so download before you leave.

Where behaviour differs by browser and platform

  • An output format the browser cannot encode: the HTML specification says the canvas falls back to PNG when the requested type is not supported. So if you pick WebP and the file barely shrinks, switch to JPG and try again. This tool calls canvas.toBlob(callback, type, quality), the same API described on MDN.
  • HEIC from an iPhone: whether it can be compressed depends entirely on whether your browser can decode that format, and many cannot. Files that fail are marked on their own row. Setting the iPhone camera to Most Compatible so it records JPEG is the easiest way around it.
  • Social platforms: uploads are normally re-encoded by the platform itself, so compress to the dimensions and size it asks for and stop there. Squeezing further only means your already degraded image goes through a second lossy pass. Published limits change, so check the current figures with the platform.
  • Transparency: saving a PNG as JPG loses the alpha channel. The specification has the browser flatten the transparent pixels onto a solid background, commonly black, which is easy to miss on a logo until it is already in the layout. Output PNG or WebP when you need transparency.
  • Desktop versus phone: the work happens on your device, so the same batch is noticeably slower on an older phone, and a very large image can exhaust the memory a mobile browser allows a tab. Work in smaller batches on mobile.

Limits worth knowing

Nothing is uploaded. The files you pick are re-encoded by the browser canvas on this device, with no network request in the process, so the page works offline. Scanned documents and screenshots containing personal data can be handled here without them reaching anyone.

  • Lossy compression cannot be undone. Compressing an already-compressed file again only degrades it further, so always go back to the original when you change settings rather than feeding an output back in.
  • The maximum width only shrinks, never enlarges. Entering a number larger than the original will not sharpen anything; the image keeps its own width.
  • The output is a redrawn image, so EXIF data such as the capture time and GPS location is dropped. That is a feature when you are sharing a photo and a problem when you need an archive copy.
  • Files over 10 MB are skipped, and while more than 50 at once is allowed, everything runs in this tab’s memory. Split very large batches.
  • Colour management is left to the browser. An image in a wide gamut profile may come back looking slightly different, so check a colour critical image before publishing it.

Frequently asked questions

Does compressing an image make it look worse?

JPG and WebP are lossy: the lower the quality, the smaller the file and the more visible the blocky artefacts around edges and in flat areas such as skies. Around 80 percent most photos look identical to the original on a normal screen. PNG is lossless, so it only gets smaller when you reduce the width. Every row in the list shows the compressed size and the percentage saved, so you can try two or three settings and compare before you download.

Why did my file get bigger instead of smaller?

Two common causes. The first is re-encoding a JPG that was already compressed at a quality close to 100 percent, which stores an image that has already lost detail as a large high quality file again. The second is asking for an output format your browser cannot encode: the HTML specification says the canvas falls back to PNG in that case, and a photo saved as PNG is usually bigger than the JPG you started with. Lower the quality, or switch to JPG, and try again.

Are my images uploaded to a server?

No. The files you pick are re-encoded by the browser canvas on your own device. There is no network request at any point, so the page still works with the network disconnected. Scanned contracts, screenshots with personal data and anything else you do not want a third party to hold can be processed here safely.

Can I compress a whole folder of images at once?

Yes. Drop the batch onto the upload area and each file is processed in turn. Files over 10 MB are skipped with a notice, and more than 50 files at a time only triggers a warning that it may be slow. Each image is handled separately, so one unreadable file does not stop the rest, and when the batch is finished you can take everything away with Download all as ZIP.

Does the compressed image still have its EXIF data?

No. The output is a new image redrawn on a canvas, so the original EXIF block, including the capture time and any GPS coordinates, is not carried over. If you need to keep that metadata this is the wrong tool. If you want it gone before you share a photo, this removes it for you.

Can I compress to a specific file size, such as under 2 MB?

There is no automatic target size mode, so you adjust it yourself. Set the maximum width to the size the image will actually be displayed at first, because that has the largest effect on the file size. Then lower the quality in steps of about 10 percent and watch the compressed size in the list until it is under the limit. The list re-compresses automatically when you change a setting, so you do not need to pick the files again.

Why is the quality slider disabled when I choose PNG?

PNG is a lossless format with no quality parameter to set, so the slider is switched off while PNG is selected. To make a PNG smaller, reduce the maximum width, or switch the output to WebP, which also keeps a transparent background.

Which format should I use for a website?

WebP for photographs, because Google reports that lossy WebP files are roughly 25 to 34 percent smaller than comparable JPEG files, and every current major browser can display it. Keep a JPG copy if you have to support something old. Use PNG only for logos, icons and screenshots with flat colour, or when you need a transparent background and cannot use WebP.

Can it compress HEIC photos from an iPhone?

Only if the browser you are using can decode HEIC, which not all of them can. A file that cannot be read is marked as failed on its own row and the rest of the batch continues. The simplest fix is to set the iPhone camera format to Most Compatible so it saves JPEG, or to export the photo as JPEG before compressing it.

Sources

  • MDN, HTMLCanvasElement.toBlob(), the API this tool uses, including the fallback to PNG for an unsupported type.
  • WHATWG, HTML Standard, the canvas element, for how a bitmap is serialised to a file and what happens to transparency in a format without an alpha channel.
  • Google, WebP documentation, for the size comparison between WebP and JPEG.
  • Attachment ceilings and the image limits of individual social platforms are set by each service and change without notice; check the current figures with the service itself.

More image tools

To switch between JPG, PNG and WebP without shrinking anything, use the image converter. To inline a small icon in a stylesheet or an email template, turn it into a data URI with image to Base64. If you are preparing assets for a printed or on-screen link, the QR code generator outputs SVG as well as PNG.

Related tools

Privacy: your images never leave this device. Once you pick a file the browser canvas re-encodes it locally, with no upload and nothing stored on a server, so the tool works offline. Close the tab and both the list and the compressed files are gone.