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
- —
How to use the Compress Image to 40KB
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.
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.
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.
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.
| Size limit | 40 KB or less (40,000 bytes) |
|---|---|
| Output format | JPEG (WebP optional) |
| Dimensions | Original, shrunk only if needed |
| Typical result | About 450 to 700 px wide for a normal photo |
| Processing | In 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
- GuideHow to Compress a Photo to an Exact KB SizeA step-by-step guide to getting any photo under a KB limit such as 20 KB, 50 KB or 100 KB, on a phone or computer, without making it blurrier than it needs to be.
- GuideKB vs KiB: Why a "20 KB" Photo Can Still Be RejectedKilobytes can mean 1000 or 1024 bytes depending on who is counting. Here is how the difference causes upload errors, and how to pick a file size that passes every check.
- GuideWhy Online Forms Reject Your Photo: 9 Causes and FixesFile too large, wrong format, wrong dimensions or a HEIC photo from an iPhone: the most common reasons an upload form refuses a photo, and how to fix each one.
- GuideDPI vs Pixels: What Actually Changes a Photo's File SizeWhy changing a photo's DPI does not make it smaller, what pixels and DPI really mean, and what to do when a form asks for a photo at 200 or 300 DPI.
Related presets
- Compress Image to 30KBReduce a photo or scan to 30 KB or less for application forms. Free, private and works on any phone.
- Compress Image to 50KBShrink JPG, PNG or WebP photos to 50 KB or less without losing more quality than you have to. Free and private.
- Passport Size Photo Maker 35x45mmCrop and compress a photo to the 35×45 mm passport size (413×531 px at 300 DPI) under 50 KB, on your phone.