ToolHub

Image Compressor

Reduce image file size without losing quality

Drop images to compress

Supports: JPEG, PNG, WEBP

Overview

Compress images without losing visible quality

Image compression is the process of reducing a file size by either removing visual data the human eye barely notices (lossy compression) or by storing the same data more efficiently (lossless compression). Most tools do both. The ToolHub image compressor uses smart adaptive compression that adjusts quality and dimensions to hit your target size while preserving how the image looks at normal viewing distance.

You set a percentage of the original file size you want to keep, the tool figures out the right quality and resampling settings, and processes everything in your browser using a Web Worker so the page stays responsive even with large batches.

Step-by-step

How to compress images with ToolHub

  1. 1

    Drop your images

    Add JPG, PNG, or WebP files. There is no limit on how many you can compress at once. Heavy batches may take longer because all processing happens on your device.
  2. 2

    Pick a preset or set custom level

    Three presets cover most needs: High compression keeps about 25 percent of the original size, Balanced keeps 50 percent, High quality keeps 75 percent. Or use the custom slider for fine control from 10 to 90 percent.
  3. 3

    Review the projection

    The compressor shows your original total size, projected target size, and estimated savings before you commit. This lets you tune the level until the trade-off feels right.
  4. 4

    Compress and download

    Hit compress. Each file is processed individually with a per-file target so a 10 MB photo and a 200 KB icon both shrink by the same relative amount. Download files one at a time or all together.

Already-optimized images may not shrink

Some images you upload may already be near their compression limit. The compressor flags these as Already optimized instead of producing a larger output. This protects you from accidentally inflating files you meant to shrink.

Background

How image compression actually works

JPG, PNG, and WebP each handle compression differently. JPG uses a mathematical technique called Discrete Cosine Transform that splits an image into 8x8 pixel blocks and discards high-frequency detail your eye is least sensitive to. PNG uses a pattern called DEFLATE (the same algorithm as ZIP) plus pre-processing filters that re-arrange pixel data so it compresses better. WebP combines ideas from both and adds a more modern entropy coder, which is why it beats JPG and PNG on size for most images.

Why a percentage and not a fixed KB target?

A fixed KB target only makes sense for one specific image. If you set 500 KB but your image is 200 KB, the result is meaningless. If you set 500 KB but your image is 50 MB, you are asking for extreme compression that will degrade visibly. A percentage scales naturally across any file size: 50 percent of 200 KB is 100 KB, 50 percent of 50 MB is 25 MB, and both produce similar visual results because the compressor is being asked for the same relative reduction.

Use cases

When to compress images

Faster website loading

Smaller images mean faster Largest Contentful Paint, better Core Web Vitals, higher Google rankings, and lower bounce rates.

Email attachments

Most email providers cap attachments at 25 MB. A few photos can blow past that quickly. Compress first to fit the limit.

Online forms with size limits

Job sites, government portals, and university applications often limit uploads to 1 to 5 MB. Compression makes any photo fit.

Cloud storage savings

Free Google Drive, Dropbox, and OneDrive tiers are limited to 5 to 15 GB. Compressing a photo library can reclaim gigabytes.

WhatsApp and messaging apps

Messaging apps re-compress photos with their own settings, often poorly. Compress first for predictable quality.

Mobile data savings

Smaller images use less data when shared, reducing costs on metered connections.

Tips for the best compression results

  • Start with the Balanced preset (50 percent) and adjust only if needed.
  • For photos meant for the web, anywhere from 25 to 50 percent usually looks fine at normal viewing sizes.
  • For images with text or sharp UI elements, stay above 50 percent to keep edges crisp.
  • Convert PNG photos to JPG before compressing for far better size reduction.
  • If you need transparency, stick with PNG or WebP instead of JPG.
  • Compressing the same image multiple times degrades it more each cycle. Always compress from the original, not from a previously compressed copy.

Common questions

Is compression reversible?

Lossy compression (JPG and lossy WebP) is not reversible. Once detail is removed, it cannot be restored by re-saving at higher quality. Always keep an untouched original if you might need it later.

What is the smallest size I can reach?

The custom slider goes down to 10 percent of the original. Below that, results look noticeably degraded for most images. The compressor will not produce a file smaller than is physically possible for the chosen format and dimensions.

Can I batch compress hundreds of images?

Yes. The compressor uses a Web Worker so the page does not freeze during heavy batches. Time is roughly linear with the number of files: 100 images of 2 MB each typically take under a minute on a modern laptop.

100% private

Privacy and security

Images stay on your device

The compressor uses the browser-image-compression library which runs in a Web Worker on your CPU. No file is uploaded to a server. You can disconnect from the internet after the page loads and the compressor will still work.

Related tools

Quick steps

1

Drop images

Add JPG, PNG, or WebP images. Batch is supported.

2

Pick a level

Choose a preset or slide to set how much of the original size to keep. Smaller % means more compression.

3

Save

Download compressed images, original quality preserved as much as possible.

Frequently asked questions

How does the compression work?

We use smart adaptive compression that adjusts quality and dimensions to hit your target size while preserving visual quality.

Are images uploaded to your servers?

No. Compression happens entirely in your browser using a Web Worker. Your images stay on your device.