Skip to content

Compress

Compress Image to 40KB Online

Some portals cap photos at 40 KB, often with a lower minimum such as 20 KB. FitKB compresses your photo in the browser and keeps the sharpest version that stays under 40 KB.

Your photo

Original: —

Result

The compressed photo appears here. The Download button below turns on when it is ready.

New size
—
Exact
—
Limit
40,000 bytes
Dimensions
—
Quality
—
Saved
—
Settings
KB
px
px
50 %

0 keeps the top of the photo, 100 keeps the bottom. Used when cropping.

How to use the Compress Image to 40KB

  1. Choose your photo

    Tap the upload area to pick a photo from your gallery or camera, drag a file onto it, or paste an image. JPG, PNG and WebP all work.

  2. Keep 40 KB as the limit

    The size limit is already set to 40 KB. Change it if your form asks for something else. You can also cap the width and height.

  3. Let FitKB find the best quality

    The tool re-encodes the photo several times in your browser and keeps the sharpest version that is still under the limit. It only shrinks the dimensions when quality alone is not enough.

  4. Check and download

    Compare the before and after sizes, zoom into the preview, then tap Download. The file name includes the limit so you can find it in your downloads.

Output specification

These are the starting settings for this page. You can change every one of them in the Settings panel above.

Compress Image to 40KB output specification
Size limit40 KB or less (40,000 bytes)
Output formatJPEG (WebP optional)
DimensionsOriginal, shrunk only if needed
Typical resultAbout 450 to 700 px wide for a normal photo
ProcessingIn your browser, nothing uploaded

Methodology, privacy and accuracy

  • Runs on your device. The photo is decoded and re-encoded with the browser's Canvas API. It is never uploaded, so passport photos and signatures stay private.
  • How the size is reached. FitKB tries the highest JPEG quality first, then binary-searches the quality until the file is at or under the limit. Dimensions are reduced only when quality alone cannot reach it, and never for fixed-size photos.
  • Safe for strict forms. The limit is applied as KB × 1000 bytes, so the file passes whether a portal counts 1 KB as 1000 or 1024 bytes. Metadata such as GPS location is not copied into the new file.
  • Tested. The size search and crop calculations are covered by automated tests.
  • Last reviewed: .

Frequently asked questions

How do I make sure the photo is not below a 20 KB minimum?

Use 40 KB as the limit. Results land close to the limit, and the exact byte count is shown so you can confirm it is above the minimum.

Can I also set exact pixel dimensions?

Yes. Choose Exact width × height, crop to fill in the Dimensions setting and enter the numbers from your form. FitKB then compresses that crop under 40 KB.

Are my photos uploaded to a server?

No. The photo is decoded, resized and compressed inside your browser with the Canvas API. Nothing is uploaded, so ID photos and signatures never leave your phone or computer.

Why is the result a little under the KB limit instead of exactly on it?

Upload forms reject files that are even one byte over the limit, and some count 1 KB as 1000 bytes while others use 1024. FitKB stays at or under the limit times 1000 bytes, which passes both checks, and picks the highest quality that fits.

Can I use photos from an iPhone (HEIC)?

Yes in Safari, and when you pick a photo through the iPhone photo picker it is usually converted to JPG automatically. If another browser cannot open a HEIC file, export it as JPG (Share, then Save as JPEG) and try again.

Learn more