ToolActToolAct

Image Compression Tool

Batch compress images, keeps original format, adjustable quality

Upload Images

Drag images here, or click to select files

Supports JPG, PNG, WebP, BMP, GIF formats, select multiple at once

What is Online Image Compression?

Online image compression reduces image file size so pages load faster, uploads fit size limits, and shared files consume less bandwidth. Files are uploaded to ToolAct's conversion service, processed with server-side libraries (libvips / mozjpeg / libwebp), and the compressed result is downloaded back. Originals are deleted from the server immediately after the conversion completes - they are not archived and are not used for training. Depending on the format, compression may adjust quality, metadata, color information, and encoding details; a photo can become much smaller while still looking acceptable at normal viewing size. It fits blog images, product photos, social posts, support attachments, and drafts that do not need to preserve every original pixel. It is not the same as professional print preparation, so images meant for archives, large prints, or fine visual inspection should be checked after compression. Avoid uploading photos containing personal information, internal documents, or other sensitive material.

How to Use

How to use

  1. Drag or click to upload images (supports multiple)
  2. Adjust the quality slider to choose compression ratio
  3. Click "Compress" button to execute
  4. View results, download individually or all at once

Compression Checks

  • Compare the compressed image at actual display size; file size can drop while small text, gradients, or fine texture become worse.
  • For archives, legal evidence, or print files, keep an untouched original and export a separate compressed copy.

Use Cases

Compress several images in a batchAdd JPEG, PNG, WebP, BMP, or GIF files, choose a quality value, and compress pending or failed items while preserving each file in the on-page list. The server-side encoder uses 4:2:0 chroma subsampling for JPEGs by default, so smooth skin tones compress well but red text on a yellow background can lose its sharpness at quality 60.
Compare original and compressed sizes before downloadingReview per-image status plus total original size, total compressed size, and saved percentage so you can decide whether the quality setting is acceptable. The 75-85 range is the typical sweet spot for mozjpeg photos, while guetzli squeezes another 20% at the cost of much slower encoding.
Download only successful compressed resultsDownload individual completed images or all completed items after compression. Failed items can be retried without clearing the whole batch, and originals should be kept until the compressed versions have been visually checked.
Re-run failed items after fixing input type or qualityLeave failed rows in the batch list, change quality or input type, and click retry so the successful items keep their status and only the problem entries are reprocessed without reloading everything. This is especially useful when a single oversized file in a 50-image upload fails the worker and the other 49 are still ready to download. PNG zlib level 1 is faster but produces a larger file, while level 9 squeezes the last bytes out of flat-color banners at the cost of extra CPU on huge photos.
Tune quality until size drop is acceptable for the use caseRun the same image at quality 80, 60, and 40, then compare the saved percentage and visual result to pick the lowest setting that still keeps edges, transparency, and skin tones usable for blog or product use. Progressive JPEG scans let a partial download already show a coarse version, which is useful for slow mobile networks, while a baseline scan is friendlier to older image editors that re-save the file. PNG at zlib level 1 encodes quickly but ships a larger file, while level 9 trims more bytes at the cost of CPU time on big images.

Technical Principle

Image compression splits cleanly along the lossy/lossless boundary. Lossy formats (JPEG, WebP lossy) exploit human perceptual limits: the eye is far less sensitive to high-frequency chroma than to luma, so encoders throw away tiny color detail in 8x8 or 16x16 blocks without most viewers noticing. JPEG has used this DCT-based path since 1992; the modern alternatives are mozjpeg (~5-10% smaller than libjpeg at the same SSIM, slower encoder), libwebp (Google's VP8/VP8L image codec, 2010), and AVIF (Alliance for Open Media, AV1 intra, 2019). Lossless formats (PNG, GIF, WebP lossless) shrink bytes through entropy coding - LZ77 sliding-window dictionary plus Huffman or arithmetic coding - and never alter a single pixel. The pipeline used by this page is fully server-side. The browser packages each image into a signed multipart upload to ToolAct's compression endpoint (/image/compress). The server validates the request, hands the bytes to libvips - a high-performance, low-memory image processing library - which decodes the source, optionally resizes the long edge to bound the output dimensions, and re-encodes through mozjpeg for JPEG, libwebp for WebP, or libpng/oxipng for PNG. The encoded bytes are streamed straight back to the browser as the download response, and the temporary upload file is deleted from disk as soon as the response is flushed. There is no archival, no training pipeline, and no human review of the contents. JPEG quantization is the heart of the format: a quality of 90 keeps almost all DCT coefficients, 75 starts dropping mid-frequency ones (visible in red text on yellow), 50 is the obvious-JPEG zone where blocking artifacts appear on smooth gradients, and 25 produces visible posterization on faces. PNG compression sits on zlib (DEFLATE) levels 0-9; level 1 is fast but ships larger files, level 9 squeezes the last bytes from flat-color banners at the cost of CPU. EXIF, ICC profiles, XMP, and IPTC metadata are usually dropped because the encoder rebuilds the file header from scratch - a real reason a 200 KB camera photo can become a 60 KB upload even at the same resolution, and a reason image provenance and color-management metadata should be preserved separately if they matter.

  • libvips (John Cupitt, LGPL) is the server-side image processing engine: a streaming, demand-driven pipeline that keeps memory use low even on 100 MP inputs and underpins Sharp, ImageMagick's IM7 vips delegate, and the conversion endpoints behind this tool.
  • mozjpeg (Mozilla, libjpeg-turbo fork with better psychovisual models) produces 5-10% smaller files than stock libjpeg at the same SSIM but is roughly 3-5x slower to encode - the trade-off behind most JPEG-quality 80-85 web defaults since 2017.
  • PNG is LZ77 + Huffman: the encoder finds repeated byte sequences up to 32 KB back (sliding window), emits (distance, length) pairs, then Huffman-codes the result. WebP lossless (VP8L) uses a similar idea plus Local Palette patches, typically beating PNG by 20-26% on the same RGBA pixels.
  • libwebp is Google's reference WebP encoder/decoder; the server side uses it to write either lossy VP8 (quality 0-100, 4:2:0 chroma by default) or lossless VP8L (quality controls compression effort, never pixel fidelity). WebP decode is widely available (Chrome 32+ 2014, Firefox 65+ 2019, Safari 14+ 2020), so a converted WebP is safe for almost every modern browser.
  • The 4:2:0 chroma subsampling default in JPEG (two chroma samples per 4 luma) is what makes red text on a yellow background look blurry at quality 60 - the chroma detail is dropped before the luma detail is. Switch to 4:4:4 (no subsampling) for screenshots and UI captures where text edges matter.
  • EXIF (Exchangeable image file format, JEITA CP-3451) and ICC color profiles are stripped on re-encode by default, so a 6.3 MB iPhone JPEG often lands at 1.8 MB after the server touches it. That is the reason consumer photographers see file sizes drop after every round-trip through a web tool. A practical batch pitfall: when a folder mixes small icons (under 200x200 px, PNG with alpha), flat-color UI screenshots (PNG, very high compressibility), and phone photos (JPEG, mostly noise-like content), a single quality slider is wrong for all three. Icons want lossless PNG or WebP lossless; screenshots want 4:4:4 JPEG at quality 85-90; photos want lossy WebP at quality 75-80. Compressing them all at quality 60 saves bytes but introduces red fringing on icons, ringing artifacts around screenshots, and banding on the photos. The smarter pipeline runs each category through a different encoder path, which is why the API accepts a target format override per file even when the user picks one default. Looking forward, JPEG XL (ISO/IEC 18181, 2022) is the format Google and Cloudflare have been pushing since 2020 as the JPEG successor: ~20% smaller at the same quality, full lossless mode, no chroma subsampling, and a progressive decode friendly to slow networks. Browser support is partial (Chrome disabled JPEG XL in 110), so the practical migration path for now is WebP at quality 80, AVIF for hero assets that need the extra bytes, and keep a JPEG fallback for old Safari or older email clients. The page exposes quality, max dimension, and target format as the three levers that matter; everything else is implementation detail.
  • Server-side conversion lifecycle: every uploaded file is held only long enough to run libvips decode + re-encode and stream the result back. The temporary file is deleted on response close, regardless of whether the conversion succeeded or failed. A 24 MP JPEG that would have stalled the renderer's main thread for 200-500 ms is processed off the user's device entirely.
  • Migration: AVIF is the next-generation target (Alliance for Open Media, AV1 intra, supports 10/12-bit, alpha, animation). Server-side AVIF encoding via libavif/aom is still 10-30x slower than WebP, so most pages stick with WebP at quality 80 and reserve AVIF for hero photos that benefit from the extra 15-20% byte savings.

Examples

Web Product Image Compression

Original 2MB JPG, quality set to 75%, compressed to about 300KB, load time drops from 3s to 0.5s

PNG to WebP Compression

PNG transparent image 800KB, converted to WebP about 150KB, transparency fully preserved, size reduced by 81%

Batch Compress Travel Photos

50 photos totaling 500MB, quality 80%, compressed total about 100MB, saving 400MB storage space

FAQ

Are my images compressed locally?

No. Each image is uploaded to ToolAct's compression service (the /image/compress endpoint), processed there with libvips and mozjpeg/libwebp, and the compressed result is downloaded back. The temporary file is deleted from the server immediately after the conversion completes - it is not archived and not used for training. Avoid uploading photos with personal information, internal screenshots, or proprietary artwork.

Which formats and sizes can I compress?

JPEG, PNG, and WebP are the common inputs. Very small files may not shrink further because they are already near optimal. Extremely large originals (tens of MB) may take longer or fail; resize first if you only need a web-ready version.

Is the compression lossy or lossless?

JPEG and WebP compression is lossy - the encoder discards visual detail to save bytes, and you cannot recover the original from a compressed copy. Always keep the original master file alongside the compressed output.

Can I control the quality level?

The interface picks a balanced quality preset by default. If a particular image looks soft after compression, re-upload the original and try a different quality option, or export at a higher quality from the source app first.

Why did my PNG barely shrink?

PNG is lossless and already-optimized PNGs (icons, screenshots, line art) have little room to compress. To shrink them noticeably, convert to WebP or save as JPEG when the image has no transparency and minor color shifts are acceptable.

Will EXIF metadata, ICC profiles, and transparency be preserved?

Compression typically strips EXIF metadata such as camera, GPS, and timestamps, which is a privacy benefit but means the compressed copy is not suitable for forensic or legal use. Alpha transparency on PNG and WebP is preserved; an embedded ICC color profile may be re-encoded or dropped.

How much smaller will the file get?

Photographic JPEGs typically drop to 30-60% of the original after recompression. PNG screenshots often drop 10-30%. Files that are already heavily compressed or low resolution may not shrink at all - the result panel shows the size change so you can decide whether to keep it.