Loona Automation β€Ί Image Compressor β€Ί Compress Image to 40 KB

Compress Image to 40 KB

Compress JPG, PNG and WebP images to 40 KB or under, online and free. Automatic quality and size search in your browser β€” no signup, no upload.

🎯
Drop your image here, or click to browse
JPG, PNG or WebP. Target: 40 KB (40960 bytes, counting 1 KB = 1024 bytes). Converted to JPG on your own device β€” never uploaded.

Add an image to begin.

How to compress an image to 40 KB in 3 steps

  1. Add your image β€” drop a JPG, PNG or WebP above or click to browse. Nothing is uploaded; the image stays on your device.
  2. Press β€œCompress to 40 KB” β€” the tool automatically searches for the highest JPG quality whose file fits 40 KB, and only reduces the dimensions if quality alone cannot get there.
  3. Download the result β€” you see the original size, the final size and the final dimensions before you download, including an honest note if the dimensions had to be reduced.

Who needs an image under 40 KB?

This page exists for form and portal photo limits in the 40 KB range, and fast-loading thumbnails for listings and profiles. Instead of guessing with a quality slider and re-saving five times, you state the limit once and the tool searches for you: first quality at full size, then β€” only if needed β€” smaller dimensions, until the file fits at or under 40 KB.

Forty kilobytes is a comfortable size for an on-screen ID or profile photo: small enough for any form, large enough to stay recognizable and clean.

How it works

The image is decoded locally in your browser and drawn onto a canvas. It is first encoded as JPG at 92% quality. If that already fits 40 KB, you are done. If not, a binary search between 5% and 92% quality finds the highest quality that fits, keeping the full dimensions. Only when even the lowest quality is still too large does the tool step the dimensions down by 15% at a time (re-encoding at 70% quality) until the file fits β€” and when that happens, the result line says so and gives the final dimensions. The output is always a JPG at or under 40 KB (40960 bytes), and because everything happens on your device, your image is never uploaded.

Worked example

A 1.8 MB JPG compressed to 40 KB keeps most of its dimensions in this example and finishes at just under 40 KB β€” the quality search does most of the work, with only a small dimension step if your photo is unusually detailed.

Frequently asked questions

Will my compressed image be exactly 40 KB?

No β€” it will be at or under 40 KB, never padded up to it. The tool searches for the highest quality that fits within the limit, so the result is usually just a few KB below it. β€œUnder the limit” is what upload forms actually require.

Why did the dimensions of my image change?

Only when there was no other way: JPG quality has a floor, and a detailed full-size photo cannot always reach 40 KB on quality alone. In that case the tool reduces dimensions step by step and tells you the final pixel size in the result line.

Why is the output always JPG?

JPG gives the smallest file for photographs and is accepted by every form and portal. PNG has no quality control, so hitting an exact size with PNG is unreliable β€” that is why this page, like the main Loona compressor's target mode, outputs JPG.

What does KB mean here β€” 1000 or 1024 bytes?

This tool counts 1 KB as 1024 bytes, so the target is 40960 bytes. Some portals count 1000 bytes per KB; if yours does, your file at or under 40 KB (1024-based) is still within a few percent β€” for the strictest portals, pick the next size down to be safe.

Is my image uploaded to a server?

No. Compression happens 100% in your browser using the Canvas API. Your images never leave your device.

Is this 40 KB compressor free?

Yes β€” completely free, with no signup, no watermark and no limit on the number of images.

More free photo tools

Image Compressor

Compress photos to any exact KB size with the full tool.

Image Format Converter

Convert JPG, PNG and WebP both ways, with quality control.

Compress Image to 10 KB

Compress any image to 10 KB or under, automatically.

Compress Image to 20 KB

Compress any image to 20 KB or under, automatically.

Compress Image to 30 KB

Compress any image to 30 KB or under, automatically.

Compress Image to 150 KB

Compress any image to 150 KB or under, automatically.

Compress Image to 300 KB

Compress any image to 300 KB or under, automatically.

Compress Image to 500 KB

Compress any image to 500 KB or under, automatically.

Compress Image to 1 MB

Compress any image to 1 MB or under, automatically.

Compress Image to 2 MB

Compress any image to 2 MB or under, automatically.

Resize Image

Resize by pixels, cm or inches, with a print DPI setting.

Embed this tool on your website β€” free

Add this tool to your own website or blog β€” it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the tool to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.