ToolBook
Support us on Ko-fi
Help us keep this free, forever

Image Compressor

How to compress an image online

Drop your image, adjust quality, and download the compressed file. No server upload required.

  1. Drop or select an image

    Drag an image file onto the drop zone, or click to browse. JPEG, PNG, WebP, and GIF are all accepted.

  2. Choose output format

    Select JPEG for broadest compatibility, WebP for roughly 25% smaller files than JPEG at the same quality, or AVIF for the smallest output on modern browsers.

  3. Adjust quality

    Drag the quality slider. The compressed file size updates in real time. For web images, 70 to 80% is a good starting point.

  4. Review the savings

    The panel shows original size, compressed size, and percentage reduction. Aim for at least 50% reduction for typical web images without visible quality loss.

  5. Download the compressed image

    Click Download to save the compressed file. The filename includes the quality percentage so you can compare multiple exports.

Frequently asked questions

Does the image leave my device?

No. All processing happens inside your browser using the Canvas API. The image is never uploaded to any server. This makes the tool completely private and it works offline once the page is loaded.

Does compressing strip EXIF and GPS metadata?

Yes. The Canvas API decodes your image to raw pixel data and re-encodes it to the output format. In this process, all metadata including EXIF, GPS coordinates, and camera model tags is discarded. This is a useful privacy benefit when sharing images publicly. If you need to preserve copyright or creation-date metadata, keep a copy of the original file.

What image formats are supported?

JPEG, PNG, WebP, and GIF (first frame only) are accepted as input. The output can be JPEG, WebP, or AVIF. All three output formats support lossy quality control. PNG output is always lossless and produces larger files, so it is not offered as a compression output. If you upload a PNG with transparency and need to preserve it, use WebP output at 80% quality or higher.

What quality setting should I use?

For web images such as thumbnails, blog photos, and product images, 70 to 80% JPEG quality is typically indistinguishable from the original at normal viewing distances. For hero banners examined closely, use 85%. For archiving or sharing, 90% or above. Below 60% you will see visible artefacts in smooth gradients. WebP achieves better quality at the same file size as JPEG, and AVIF goes further still: 65% AVIF is roughly equivalent to 80% JPEG in perceived quality.

What is AVIF and when should I use it?

AVIF (AV1 Image Format) is a next-generation format that typically produces files 20 to 50% smaller than WebP at the same visual quality. All modern browsers including Chrome, Safari, Firefox, and Edge have supported it since 2021. Use AVIF when optimising images for web delivery and your audience uses modern browsers. JPEG remains the safest choice for email attachments or images shared via older applications.

How do I compress images for email or social media?

For email attachments, JPEG at 70 to 75% typically reduces a 5 MB photo to under 500 KB while remaining sharp at inbox preview sizes. For WhatsApp or Messenger, JPEG is the safest format as some messaging apps re-encode WebP. For web sharing on Twitter, LinkedIn, or Instagram, WebP at 70% gives smaller files with better quality. Resize the image to the platform's recommended dimensions before compressing for the biggest savings.

Why is the compressed file sometimes larger than the original?

This happens when the original image was already heavily compressed. Re-encoding it re-applies compression to an already-lossy source, which can inflate the file after the canvas decodes it to a raw bitmap and re-encodes it. Try lowering the quality slider. Also, PNGs with minimal colour depth such as logos are often more efficiently stored as PNG than re-encoded as JPEG.

Is there a file size limit?

There is no hard limit. The constraint is your device's available RAM. A 20 MP DSLR JPEG (5 to 8 MB file) decodes to roughly 60 MB in memory as a raw bitmap. Most modern phones and laptops handle this easily. Very large panoramas above 100 MP may cause the tab to run out of memory. Split them first if that happens.

Can I compress multiple images at once?

Not yet. The tool processes one image at a time. Drag in the next image when you are done with the current one and the tool resets automatically.

Image compression: lossy vs lossless, JPEG artefacts, and why quality 80% is usually enough

How JPEG and WebP compression work, what quality settings mean in practice, and when lower quality is indistinguishable from the original.

How JPEG compression works

JPEG uses a lossy compression algorithm designed for photographs. The process has three stages: colour space conversion (RGB → YCbCr, which separates brightness from colour), a Discrete Cosine Transform (DCT) that converts 8×8 pixel blocks into frequency components, and quantisation — where high-frequency details are discarded at a rate controlled by the quality setting.

The quality slider maps to a quantisation table multiplier. At quality 100, almost no data is discarded — the file is nearly lossless (and nearly as large as an uncompressed bitmap). At quality 50, coarse frequency data is retained but fine detail is aggressively rounded. Below quality 40, visible artefacts appear: blocky 8×8 "mosquito noise" around sharp edges, posterisation in smooth gradients.

Why 80% is usually enough

Human vision is more sensitive to luminance (brightness) changes than to chrominance (colour) changes. JPEG exploits this by subsampling the colour channels at 4:2:0 by default — storing one colour sample per 4 brightness samples. At quality 80%, the luminance quantisation is mild and the chroma subsampling is already applied regardless. The result is typically indistinguishable from the original at normal viewing distances on screen.

For print output, go to 90–95%. For hero images examined closely on Retina displays, 85%. For thumbnails and preview images, 70–75% is hard to distinguish and saves substantial bandwidth.

WebP vs JPEG

WebP (developed by Google, published 2010) uses a more modern algorithm — VP8 video codec intra-frame encoding with lossless fallback. At the same visual quality, WebP is typically 25–34% smaller than JPEG for photos and 26% smaller than PNG for graphics. All modern browsers and iOS (since 14) support WebP.

The tradeoff: older apps (some email clients, legacy CMS systems) may not display WebP. JPEG has 100% compatibility including decade-old Android apps and Windows XP's Photo Viewer. For web-only delivery, WebP is the better choice. For files that will be attached to emails or shared via WhatsApp, JPEG is safer.

When re-compression makes a file larger

If you open an already-compressed JPEG and re-save it at the same or higher quality setting, the file can come out larger. This happens because the Canvas API decodes the JPEG to a raw uncompressed bitmap in memory, then re-encodes it — the second encoding applies to a slightly different set of frequency components than the first, sometimes producing marginally more data. To avoid this: always start from the highest-quality source, and compress once to the target quality rather than re-compressing repeatedly.