OnlineTextLab
Esc

Image Compressor

Drag a slider and see the real file size and picture change, or type the KB limit you need to meet.

Drop your images here

Or paste it with Ctrl V

or drop them here, or paste from the clipboard

JPG, PNG, WebP, BMP or GIF. Drag the quality slider and watch the real file size change.

Runs on your device. Your files and text are not uploaded.

About Image Compressor

Most compression tools ask you to upload, wait, and hope. Here you get the answer as you move the slider: the actual output size, how much you've saved, and a before and after view you can inspect at 100% zoom. Nothing leaves your device.

It handles the common jobs: getting under a form's limit (type the KB figure and press Find quality), making photos lighter for a website, or reducing PNG screenshots and logos without turning them into JPG.

By default each file stays in a sensible format: JPG stays JPG, WebP stays WebP and PNG stays PNG. A BMP with no transparency becomes JPG. You can change any of that under Save as.

How it works

JPG and WebP go through the browser's own encoder at your chosen quality. While you drag, only the file on screen is re-encoded. For images above 6 megapixels the tool encodes a 1024 pixel sample from the center and scales up the result, shown as an estimate, then produces the real file when you let go. That final figure is the true size of what you download.

PNG is different, because browsers offer no compression setting for it. So this tool does what dedicated PNG optimizers do. It reduces the image to a palette of up to 256 colors with a median cut, smooths gradients with error diffusion, then writes a real indexed PNG itself, with its own header, palette and transparency chunks. If your PNG already has few enough colors, they are kept exactly.

Find quality runs a binary search over the slider, encoding repeatedly until it finds the highest setting that fits your target. All files are re-encoded, so metadata is removed from everything.

How to use Image Compressor

  1. Press Select images to compress, or drop one or many onto the page.
  2. Drag Quality and watch the bar and the size line under it. To meet a limit, type a number under Or aim for a file size, then press Find quality.
  3. Check the picture with the Compare slider. Set zoom to 100% to see real pixels.
  4. Optionally change the format under Save as.
  5. Press the download button, or Download all as ZIP for a batch.

Real runs at different settings

Starting from a 698.4 KB JPG at 1600 × 1067, quality 90 gave 501.8 KB (28% smaller), 75 gave 195.4 KB (72%), 50 gave 104.5 KB (85%), and 25 gave 52.1 KB (93%). Typing 300 and pressing Find quality settled on 84, for a file of 293.0 KB. An 800 × 800 transparent PNG of 479.1 KB dropped to 161.2 KB at 75 while staying a PNG, or to 57.3 KB when saved as WebP.

When it helps

  • Getting a passport or ID photo below a government site's 200 KB upload limit.
  • Bringing a folder of phone photos down to a size you can email together.
  • Reducing a PNG logo or screenshot on a website, with transparency and format unchanged.
  • Fixing a CMS upload error caused by a file size cap.
  • Removing EXIF location data from photos while you make them smaller.

Tips for a better result

  • Reduce dimensions first when you can. A 4000 px photo shown at 1000 px wastes most of its bytes, and the Image Resizer can fix that.
  • Set Save as to WebP when the image is for your own website, and compare it against JPG at the same setting.
  • For screenshots, stay in PNG. Few colors and sharp text compress well in a palette and fall apart in JPG.
  • Compress from the original each time rather than compressing a compressed file.

Good to know

  • Files already well compressed may not shrink. The page says so instead of pretending, and in that case your original is the better file.
  • Lossy changes cannot be undone. Keep originals of anything important.
  • An animated GIF or WebP is reduced to its first frame. Use a specialist tool to compress animation.
  • Palette PNG tops out at 256 colors, so photographic PNGs may show faint grain from dithering. Use JPG or WebP for those.
  • WebP output needs Chrome, Edge or Firefox, and all metadata, including EXIF and color profiles, is removed.

Questions people ask

Can this compress an image to exactly 100 KB?

It can get under a target but not exactly on it. Find quality picks the highest setting that fits below your limit. If even the lowest setting is too large, you're told so and pointed to the resizer.

How does it make PNGs smaller without turning them into JPG?

By reducing the number of colors. A palette PNG stores each pixel as one byte, an index to a list of up to 256 colors, rather than four. Move the slider to 100 for a lossless copy instead, though browsers rarely make that smaller.

Does compression remove my photo's location data?

Yes. The output is written from canvas pixels, so EXIF fields including GPS position, camera model and date are not in the new file. Anything needing that data should use the original.

Why did my file get bigger?

It was already compressed harder than the setting you chose, or it suits another format better. Try a lower quality or another entry under Save as, and if neither helps, the original is already a good result.

Is the size on the screen exact?

After you let go of the slider, yes: it's the byte count of the file you will download. Only very large images show a temporary estimate during a drag, and it's labeled as one.

What to use next

  • Image Resizer: because fewer pixels saves more than any quality setting
  • PNG to WebP: to compare WebP against your compressed PNG
  • Image Cropper: to cut away parts of the picture you do not need

Learn more

Last reviewed . Read our editorial policy.