Image Compressor
File ToolsCompress images to a target size in your browser. Your files are never uploaded.
Your files never leave this device. Everything here runs in your browser — your files are never uploaded, stored or seen by us. Open your network tab and check.
Around 75 is usually indistinguishable from the original at a fraction of the size.
0 keeps the original dimensions. Resizing usually saves more than quality alone.
Results
Add images to compress them. They are processed here in your browser and never uploaded.
Re-encoding removes EXIF metadata, including GPS coordinates and camera details. Rotation is applied first, so photos keep the right orientation.
How this is calculated
decode -> createImageBitmap(file, { imageOrientation: "from-image" })
draw -> OffscreenCanvas at the target dimensions
encode -> convertToBlob({ type, quality })
Target-size mode binary-searches quality between 0.30 and 0.95,
eight times, keeping the best result that fits under the cap.How it works
Compression here means re-encoding. The image is decoded, drawn onto a canvas, and encoded again at a lower quality setting. JPEG, WebP and AVIF are all lossy: they discard detail the eye is least likely to miss, and the quality setting decides how much.
Target-size mode is the one most people actually want. Rather than guessing at a quality slider, it binary-searches the quality between 0.30 and 0.95 — eight encodes, each halving the remaining range — and keeps the largest result that still fits under your cap. That is how you get a file just under 100 KB rather than one that happens to be 43 KB and looks worse than it needed to.
Resizing usually saves more than quality alone. A 4000-pixel-wide photo displayed at 800 pixels is carrying twenty-five times more data than the screen can use. Capping the longest edge before compressing is almost always the bigger win.
Everything happens in your browser. There is no upload, which means no size limit imposed by a server, no queue, and no copy of your photo on someone else's disk.
Worked example
A 4.2 MB phone photo that must fit under 100 KB for a form upload
- cap longest edge at 1600px -> 1600 x 1200
- try quality 0.625 -> 184 KB too big, lower the ceiling
- try quality 0.463 -> 118 KB still too big
- try quality 0.381 -> 92 KB fits, keep it
- continue narrowing to find the best that still fits
97 KB at quality 0.42 — a 97.7% reduction
How to use it
- Choose Quality to set a level yourself, or Target size to give a maximum file size and let the tool find the quality.
- Pick an output format. WebP is meaningfully smaller than JPEG at the same visual quality and is supported everywhere that matters now.
- Optionally cap the longest edge — this usually saves more than quality alone.
- Drop in one image or many. Each is processed in turn and can be downloaded individually or all together.
What this tool does not do
- It cannot compress losslessly. If you need the exact original pixels, this is the wrong tool.
- PNG output is not offered, because re-encoding a PNG through canvas rarely makes it smaller.
- AVIF is only available where your browser can encode it, which is still not everywhere.
- Very large images can exhaust memory on low-end devices, since decoding happens locally.
Frequently asked questions
How do I compress an image to 100 KB?
Switch to Target size mode, enter 100 KB, and add your image. The tool searches for the highest quality that still fits under that size, so you get the best-looking file that meets the limit.
Are my images uploaded anywhere?
No. All processing happens in your browser using the canvas API. No image data is sent over the network — you can confirm this by opening your browser's network tab while using the tool. The only requests you will see are small ones recording that the tool was used.
Which format should I choose?
WebP for most web use — typically 25–35% smaller than JPEG at the same visual quality, with universal browser support now. JPEG if something downstream specifically needs it. AVIF is smaller still but encoding support is uneven, so it only appears when your browser can do it.
Does compressing lose quality?
Yes, these formats are lossy by design. Around 75% quality is usually indistinguishable from the original at normal viewing sizes while cutting the file dramatically. Below about 50% the artefacts start to show.
Will this remove EXIF data from my photos?
Yes. Canvas re-encoding drops all metadata, including GPS coordinates, camera model and timestamps. Orientation is applied to the pixels first, so photos are not rotated by the loss. For most people this is a privacy benefit.
Why did my PNG get bigger as a JPEG?
PNG is lossless and very efficient for flat graphics, logos and screenshots with few colours. JPEG is designed for photographs and handles hard edges poorly. For that kind of image, keep the PNG or try WebP.
Can I compress many images at once?
Yes, up to twenty at a time. Each is processed in turn with the same settings, and you can download them individually or all at once.
Is there a file size limit?
No server limit, since nothing is uploaded. The practical ceiling is your device's memory — very large images on an older phone may fail to decode.
Related tools
tell us
Last updated 3 September 2026.