Skip to content

40 KB

Resize a photo to exactly 40 KB

40 KB is 40,960 bytes. This page is preset to that number, and the tool lands on it exactly whether your file needs to shrink or grow. Everything runs in your browser, so your photo is never uploaded. 40 KB is most often asked for on mid range photo fields.

Updated , written and tested by Rizwan Aslam

Resize your photo to 40 KB

Preset to 40 KB. Change the number if your form asks for something else.

Nothing leaves this device
Quality strategy
Output format
Common targets
0 KBBefore
0 KBAfter
0 x 0Dimensions
100%Encoder quality

What 40 KB actually looks like

Forty kilobytes tends to appear on forms that were written for older, slower connections and never updated. It is tight for a photograph but workable if you scale the image down first. This is the band where the resize before you compress rule stops being advice and starts being the difference between a usable photo and a smear.

This is the busiest band on application forms. Most photos arrive larger than this and have to come down, but scanned signatures often arrive smaller and have to go up. The measure that decides this is bits per pixel: the file size in bits divided by the number of pixels. Here is what 40 KB gives you at three sizes.

Measured quality of a 40 KB file at three photo sizes
DimensionsPixelsBits per pixelResult
600 x 8000.48 MP0.68Acceptable, slightly soft up close
900 x 12001.08 MP0.30Heavy artifacts, clearly degraded
1800 x 24004.32 MP0.08Heavy artifacts, clearly degraded

The largest photo that still looks very good at 40 KB is around 550 by 740 pixels. That is the point where this target still delivers roughly 0.8 bits per pixel. Above it, quality starts dropping whatever tool you use.

Both directions, one page

This is the band where both cases turn up regularly, which is why splitting them into two separate tools makes no sense. Most sites give you one tool to grow a file and a different one to shrink it, but the same algorithm does both, so this page does both.

What happens depending on your starting file size
Your fileWhat the tool doesPicture quality
Over 40 KBBinary searches encoder quality downward until it fits, then pads back up to the exact byteAs good as 40 KB allows
Under 40 KBRaises encoder quality as high as still fits, then pads the remainder losslesslySlightly sharper than before
Already 40 KBNothing at all, and it tells you soUntouched

The padding is not a trick. Every major format reserves a block for data decoders skip, so writing neutral bytes there changes the file size and not one pixel.

Getting 40 KB accepted

Three things worth knowing before you upload.

  • Aim mid range if a range is given. For 20 KB to 40 KB, target somewhere around the middle rather than the ceiling or the floor.
  • Treat the number as a ceiling when only a maximum is given, and land just under it.
  • Resize before you compress. Scaling to the pixels the form asks for gives the encoder far more room.

More rejection messages and what each one really means are in the guide to why forms reject photos.

Questions about the 40 KB target

My file is already under 40 KB. Can I still use this?

Yes. The tool raises encoder quality as high as still fits and then pads the remainder losslessly, so the file reaches exactly 40 KB with the same pixels and slightly better quality than before.

Does compressing to 40 KB change my photo dimensions?

Not unless you ask it to. Compression lowers file size while width and height stay the same. The sharpest possible strategy will scale the image down when that is the only way to keep quality reasonable, and it tells you when it does.

How many bytes is 40 KB exactly?

40,960 bytes when 1 KB means 1024 bytes, or 40,000 when it means 1000. Since 40 KB is nearly always a ceiling, target the smaller figure and you pass under either interpretation.

Will my photo look bad at 40 KB?

It depends on the pixel dimensions, not on the tool. At 600 by 800 you get 0.68 bits per pixel, which is acceptable, slightly soft up close. At 1800 by 2400 the same file size gives 0.08 and the result is heavy artifacts, clearly degraded.

Other targets