Why "compress to 20KB" is often a request that cannot be met
Every tool that offers to compress an image to an exact size will produce a file at that size. Not all of them will tell you the picture is ruined. That is the difference this page is built around.
File size is not a dial you turn independently of everything else. It is the outcome of three things: how many pixels you have, how much detail is in them, and how hard you compress. Fix the first two and the third has a floor. Push past the floor and JPEG starts throwing away information you can see going: edges smear, flat areas break into blocks, and text develops a halo.
What the quality number here actually means
Most compressors report the quality setting they used, which tells you what they asked for rather than what happened. This page reports PSNR, measured by decoding the compressed result and comparing it pixel by pixel against your original. It is a real measurement of the difference between two images, in decibels, on a logarithmic scale.
| PSNR | What you would see |
|---|
| Above 40 dB | Effectively identical. You would not spot the difference side by side. |
| 35 to 40 dB | Very good. Differences exist but need a careful eye on fine detail. |
| 30 to 35 dB | Good. Slight softening in busy areas. Fine for most web use. |
| 25 to 30 dB | Visible. Blocking around edges and text, noticeable in flat gradients like sky. |
| Below 25 dB | Damaged. Obvious artifacts. This is where the tool stops agreeing with you. |
PSNR is not a perfect model of human vision, and it is worth saying so. It slightly over-punishes noise and under-punishes blur. What it is very good at is telling you the direction and rough scale of the damage, which is exactly what you need in order to decide whether a target is sensible.
The fix when a target really is too small
If the target cannot be met at a decent quality, the answer is almost never "compress harder". It is fewer pixels. Halving both dimensions cuts the pixel count to a quarter, and that buys far more file size than turning the quality dial down ever will, at much lower visible cost.
This is why the tool offers to find the largest dimensions that hit your target while keeping quality in the good range, rather than just squeezing the resolution you started with. A sharp 640 by 360 image at 20KB looks better than a wrecked 1280 by 720 image at 20KB, every time.
Practical targets worth knowing
- YouTube thumbnails: 50MB from a computer, 2MB from the mobile app. Both generous. If you are anywhere near 2MB, something is wrong, most likely a PNG that should be a JPG. A good 1280 by 720 thumbnail lands around 150 to 400KB.
- Forms and uploads asking for 100KB or 50KB. Usually document or ID photos, where the resolution required is far lower than a phone camera produces. Reduce dimensions first.
- Email attachments. The constraint is the total, not the individual image. Several 200KB images beat one 2MB image.
- Web pages. Aim for the smallest size that still looks right at the size it is displayed. Serving a 2000px-wide image into a 600px slot wastes most of the bytes.
If you only want the file smaller without a specific number in mind, the plain image compressor is the simpler tool. To change dimensions directly, use resize and convert.
Compression Questions
Why won't this just give me the exact size I asked for?
It gives you the largest file that fits at or under your target, whenever that can be met without destroying the image. When it cannot, it tells you, because a file at the right size that nobody wants to look at has not solved your problem. It also offers the fix that does work: reducing the dimensions instead of compressing harder.
How does it find the right quality setting?
By binary search. It encodes the image at a quality level, measures the actual bytes, and narrows the range until it finds the highest quality that still fits under your target. That is around ten encodes, all in your browser, which is why it takes a moment on a large photo.
What is PSNR and why should I care?
Peak signal-to-noise ratio: a measurement in decibels of how much the compressed image differs from your original, computed pixel by pixel. Above 40 is effectively identical, 30 to 35 is good, and below 25 has visible damage. It is measured on your actual image rather than estimated from the quality setting.
Is my image uploaded to a server?
No. Every encode and the PSNR comparison run on a canvas in your browser. Nothing leaves your device, which is also why there is no size queue and no account.
Should I choose JPG or WebP?
WebP will usually hit the same target at noticeably better quality, often 25 to 35 percent smaller for the same appearance. Choose JPG when something downstream needs it, such as an older upload form or a printer. Both are supported everywhere that matters on the web now.
Why did my PNG get much bigger as a JPG, or vice versa?
They are built for different content. PNG is lossless and excels at flat colour, sharp edges, screenshots and anything with transparency. JPG is lossy and excels at photographs. A screenshot saved as JPG looks smeared around the text; a photograph saved as PNG can be several times larger than it needs to be.
Will compressing remove my photo's metadata?
Yes. The result is re-encoded from a canvas, so the original EXIF block including GPS is not carried over. If stripping metadata is your actual goal and you do not want to lose quality doing it, use the
EXIF remover, which removes it without re-compressing.
What are the limits?
25 MB per image, in any image your browser can open. Targets run from 1 to 20,000, in KB or MB, with presets from 20 KB to 2 MB. The output is JPG or WebP only, with transparent areas filled white. It tries up to 11 encodes, and if the target still cannot be met while keeping a PSNR of 32, it shrinks the dimensions instead, down to a tenth of the width.
Is there a watermark?
No. Nothing is drawn on your image. The only mark is the file name, which starts with ThumbCrafted- and can be renamed.