FLXCode Compress Image

FLXCode apps

Appearance

Compress Image

Make photos smaller by quality, or type the size you need, like 200 KB. You see the old and new picture side by side.

or drop them here, or paste with Ctrl+V

JPG, PNG, WebP, HEIC, AVIF, GIF and BMP, up to 50 megapixels each. Nothing is uploaded. Location and camera data are removed from the saved files.

Works offline: load this page, edit one picture, turn off Wi-Fi, edit more. Nothing you add is sent anywhere.

Your pictures never leave this device. There is no upload, no account and no watermark. How we count

Problem or idea? Email us

How to use it

  1. Choose your pictures. HEIC works, and the result is a JPG or WebP.
  2. Pick Quality and move the slider, or pick Target size and type a limit in KB or MB.
  3. Press Compress. Each row shows the size before and after.
  4. Press Compare on a row to see the original next to the new one, then download.

Target sizes in bytes

The target box takes KB or MB. The tool counts 1 KB as 1,024 bytes, like most file managers.

You typeBytes
100 KB102,400 bytes
200 KB204,800 bytes
500 KB512,000 bytes
1 MB1,048,576 bytes
2.5 MB2,621,440 bytes

How many test saves the target search needs

To hit a target the tool saves the picture at several qualities and keeps the best one under the limit. These counts come from the real search function, run with a cheap stand-in for the encoder.

CaseTest saves
Fits already at full quality1
Needs a search between 5% and 100%up to 9
Cannot fit even at 5%2

The search narrows the quality down to about 0.0074 (a fraction of a percent). A 12 MP photo takes a second or two for each save.

Quality or target size

Use Quality when you want to see what you give up. Lower it until the picture still looks right, then check the size in the row. Use Target size when a form says "up to 200 KB" and you do not want to guess.

PNG is lossless, so it has no quality setting. A PNG photo changes to WebP here, and that is often a tenth of the size. A PNG logo with sharp edges may be better left alone.

Numbers this uses

  • Quality slider: 10% to 100%, starting at 75%. For photos, 75% to 85% is a common range with little visible change.
  • Target size: finds the highest quality from 5% to 100% that fits, using up to 9 test saves per picture.
  • Never bigger: if the new file would not be smaller than the original, the original is returned as it is and the row says so.
  • Formats out: JPG or WebP. PNG, GIF, AVIF, BMP and HEIC go to WebP by default, which keeps see-through areas. JPG fills them with white.
  • The pixel size does not change, so the picture keeps its resolution. To cut pixels too, use the image resizer.
  • Safari cannot write WebP. There the tool saves JPG instead and tells you in the row.
  • Largest picture: 50 megapixels, 100 MB, 50 files per batch.

What the compressor does

The picture is drawn on a canvas at its full size and saved as JPG or WebP at the chosen quality. Lower quality means coarser blocks in the data and a smaller file.

The saved file has no location, camera or date tags, which also saves a few KB. If the original is kept because nothing would be smaller, its tags stay in it.

Pictures are opened and saved by your browser. A finished run counts one event, "compress", and never a file name, size or dimension (details). Zip files are made with fflate and HEIC decoding uses libheif: open source used on this site.

FAQ

How do I compress an image to under 200 KB?

Pick Target size, type 200 and leave the unit on KB. The tool looks for the highest quality that fits. If even 5% is too big, it saves the smallest it can and tells you. Then shrink the pixels first with the image resizer.

What quality should I use for a JPG?

75% to 85% is a good start for photos. Below 60% the blocky edges get easy to see. Use Compare to check on your own picture.

Does compressing change the size in pixels?

No. The width and height stay the same. Only the amount of detail stored per block goes down. To change the pixels use the resizer.

Why did the file stay the same size?

A picture that was already saved at a low quality or a clean PNG logo may not get smaller. In that case the original is returned as it is, so the result is never bigger than what you put in.

Is the compression lossless?

No. JPG and WebP at less than 100% throw away detail you cannot easily see. If you need no loss at all, keep the original or save as PNG, which is bigger.

Why did my PNG turn into WebP?

PNG has no quality setting, so it cannot be compressed more without changing format. WebP keeps see-through areas and is much smaller for photos. Choose JPG under "Save as" if a form insists on it.

Can I compress many images at once?

Yes, up to 50, with one setting for all. A target size is applied to each picture separately. Take the results one by one or as a zip.

Is the location data removed?

Yes. The picture is drawn on a canvas and saved again, and that leaves out the EXIF block with the camera, date and GPS position. One exception on the compress page: when a new file would not be smaller, your original is returned unchanged, with its data.

Are my pictures uploaded?

No. The picture is read and edited by your browser on this device. To check it, load this page, switch to airplane mode and edit a file. It still works. The picture and its file name are never put in the address, saved or counted.

More from FLXCode

Share Compress Image