Skip to content

Compress Images Without Uploading Them

Shrink JPEG, PNG and WebP with a quality slider and an optional resize. Sizes before and after, side by side. The files never leave your device.

Images

Drop images here

Nothing is uploaded. Your images are decoded, scaled and re-encoded by this browser, on this device, and they never reach a server of ours.

Write as

This browser cannot encode JPEG or WebP or AVIF, so those options are switched off rather than left to fail.

Cutting the longest edge usually saves more than the slider does.

Keep each format · quality 75 where the format is lossy · original dimensions

Every other compressor asks you to upload the photograph first. This one does not have anywhere to upload it to: the image is decoded, scaled and re-encoded by your own browser, and no request ever carries it off this device. That is not a promise about a retention policy, it is a consequence of where the work happens — there is no server here that could forget to delete anything. Drop in as many images as you like, move the quality slider until the difference stops mattering, and take the files one at a time or all of them in a ZIP.

How it is calculated

saved % = (original − compressed) ÷ original × 100 · new width = round(width × limit ÷ max(width, height))

The quality slider runs 1 to 100 here and is divided by 100 before it reaches the canvas, because MDN specifies that argument as a number between 0 and 1 and says a browser falls back to its own default for anything outside that range. Resizing works on the longest edge rather than the width, so a portrait and a landscape photograph given the same limit come out the same size on screen. After every encode the type of the returned blob is compared with the type that was asked for: a browser that cannot write the format quietly returns a PNG instead, and a PNG saved as .avif is worse than no file at all.

Source: MDN, HTMLCanvasElement.toBlob() — "If the file format is not specified, or if the given format is not supported, then the data will be exported as image/png. Browsers are required to support image/png; many will support additional formats including image/jpeg and image/webp." The quality argument is "A Number between 0 and 1 indicating the image quality to be used when creating images using file formats that support lossy compression (such as image/jpeg or image/webp)."

Questions people ask

Do my images really stay on my device?
Yes, and you can check it. Open the network panel in your developer tools, drop in an image and compress it: no request carries the file, because the decoding and the encoding both happen in a canvas in this tab. Turning off your connection after the page has loaded changes nothing either.
Why did my file come out larger than the original?
Because it was already compressed. Re-encoding a JPEG at a high quality setting asks the encoder to preserve artefacts the first pass introduced, which costs bytes. Anything under 1% saved is treated as no saving here, and the original file is offered for download instead of a new one that is no better. Lower the quality or set a longest edge and try again.
Why can I not choose AVIF?
Because this browser cannot write it. The options are probed when the page loads, by asking a canvas for each format and reading back what it actually produced — MDN documents that a data URL still starting with data:image/png means the requested type is unsupported. Anything that fails the probe is switched off rather than left to fail quietly.
What if a format fails anyway?
You are told, and no file is offered. A browser that cannot encode the format you asked for hands back a PNG under the same call, so every result is checked against the type that was requested. A PNG carrying a .webp name is a file that will break somewhere later, which is worse than an error now.
Should I convert to WebP or keep my format?
WebP is usually a third smaller than a JPEG of the same visible quality and, unlike JPEG, keeps transparency. Keep the original format when the file has to be opened by something old, or when it is a PNG of flat colour and line art, where PNG is already the efficient choice and re-encoding it gains nothing.
Why does resizing save more than the quality slider?
Because file size follows the pixel count, and the pixel count follows the square of the longest edge. A 4032 pixel photograph reduced to 1920 keeps 23% of its pixels before a single quality setting is touched. Most images that end up on a web page are displayed at well under half the size they were shot at, and nobody notices the difference except the person waiting for the page.
Does compressing again make it smaller again?
No, it makes it worse. Each lossy pass throws away detail permanently and the next pass has less to work with, so the picture degrades faster than the file shrinks. Compress from the original once, and keep that original somewhere.

Related tools

Found a problem, or want more?

A number that disagrees with its source is a defect, not a rounding preference.

What did you enter, what did the tool show, and what did you expect instead? If you have a source that disagrees with ours, a link to it is the most useful thing you can send.

Write to us

Opens your mail app with the page and tool already filled in.