Resize an image to 40 KB

Drop a photo and it is compressed to at most 40 KB (40,960 bytes) automatically: the tool searches for the highest quality that fits, then reduces the pixel size only if it must.

Original: no image yet
Choose an image to start

Resized preview

Private by design: your image is opened, edited and saved by your own browser with the Canvas API. It is never uploaded to a server, and the page keeps working offline once loaded.

How to make an image 40 KB

  1. Choose or drop the image. JPG output is preselected because it compresses photos best.
  2. The size limit is already set to 40. The tool tries quality values by binary search (7 steps) and keeps the best one under 40 KB.
  3. If even very low quality is too big, it reduces width and height and searches again; the note under the result tells you what changed.
  4. Download. Check the result size shown above the preview.

How many pixels fit in 40 KB?

A JPEG’s size is roughly pixels × bits per pixel ÷ 8. Bits per pixel depend on detail and quality, so these are rough planning numbers, not guarantees:

Image typeTypical ratePixels that fit4:3 sizeSquare
simple graphic / document scan, quality 700.6 bits/pixel0.55 MP853 × 640739 × 739
average photo, quality 701.2 bits/pixel0.27 MP603 × 452522 × 522
average photo, quality 852 bits/pixel0.16 MP467 × 350404 × 404
detailed photo, quality 903.2 bits/pixel0.1 MP369 × 277320 × 320

40 KB is a typical limit for form uploads, ID photos, avatars and email-friendly images. For such small targets, crop away background first and aim for around 400–800 px wide; a face does not need more.

KB vs kB

This tool counts 1 KB as 1024 bytes, which is how most upload forms and operating systems measure. If a form uses 1 kB = 1000 bytes, 40 KB means 40,000 bytes, so the file here will also pass.

Smaller: 30 KB. Larger: 50 KB.

Frequently asked questions

How do I reduce a photo to 40 KB without losing quality?
Remove pixels you do not need first: crop to the subject and resize to the display size. The fewer pixels, the higher the quality that fits in 40 KB.
Why can a PNG not be compressed to 40 KB?
PNG is lossless and has no quality setting. Choose JPG or WebP, or reduce the dimensions.
Will the 40 KB file still be accepted as JPG?
Yes. It is a standard baseline JPEG produced by your browser.