KBSnap

Compress image to 40 KB

Land on 40 KB, not “somewhere under it”. Nothing is uploaded.

  • No upload
  • Exact target size
  • Batch ready

Drag images here, or click to choose

JPG / PNG / WebP / HEIC · up to 25MB each · batch supported

Files never leave your device — everything runs in your browser.

Target sizethe form’s hard limit
KB
Exact hitoff = smallest possible
Output format
Remove EXIF / GPS

Why 40 KB is a hard gate, not a suggestion

A form that says “maximum 40 KB” rejects a 41 KB file. Most compressors only promise “compressed”, so people submit, get rejected, lower the quality slider, and try again. This tool searches for the best quality whose encoded byte count is still ≤ 40 KB, then reports the exact number it produced.

Why 40 KB specifically

Forty kilobytes is the awkward middle: big enough that people assume quality is free, small enough that a full-resolution phone photo still will not fit. Scholarship and school-registration forms that use this cap usually also cap dimensions at 640×480 — satisfy both, or the portal rejects on the pixel rule after accepting the size.

Where a 40 KB cap actually comes from

  • Exam and government registration portals that still cap ID photos at 20–40 KB
  • University admission systems that reject anything above 50 KB before submit
  • SIM registration and e-visa portals with a literal 30 KB field
  • Legacy HR systems that silently truncate larger files

If your form states a pixel size as well (for example 600×600 px), set the target size first and check the output dimensions — the two limits sometimes conflict.

What resolution survives at 40 KB

At a typical JPEG quality of 70–80%, a byte budget converts to a pixel budget. These are the dimensions that stay clean:

AspectDimensionsTypical use
1:1350×350profile, 2×2 in photo
3:2430×280camera default, prints
16:9460×260screens, slides

These are computed, not copied: bytes ÷ 0.34 ≈ usable pixels. Going wider than this at 40 KB starts to show blocking on skin and text.

Why one pass usually misses the target

JPEG size is not linear in quality: dropping from 90% to 80% can halve the file, then 80% to 70% only saves 15%. A single guess either overshoots the limit or wastes 40 KB of headroom. This tool encodes, measures, and narrows the range until the output sits within about 2% of the limit — and if even the lowest quality cannot reach the target, it reduces dimensions instead of shipping a broken image.

JPG, WebP or PNG at 40 KB?

At the same 40 KB, WebP keeps roughly 8–12% more quality than JPG and preserves transparency — but a handful of legacy government portals still reject .webp, so check the form’s accepted types first. JPG is the safest default for photographs: every portal accepts it, and the cost is that transparency is flattened onto white (or the background colour you pick) and thin text edges soften. PNG is lossless, so “40 KB” cannot be reached by lowering quality at all — the tool reduces pixel dimensions instead, which is the right trade for screenshots, logos and line art and usually the wrong one for photos.

Privacy: the file never leaves the tab

No upload request is made. The browser decodes the image, re-encodes it on a worker thread, and hands you a download blob. You can open DevTools → Network, drop a file, and confirm there is no request carrying it. You can also switch off your network and it still works.

Frequently asked questions

Will a 40 KB image still look sharp?
At this size the encoder is fighting physics. A 30 KB JPEG is roughly 90 000 pixels at usable quality, so the result only looks clean if you also drop the pixel dimensions — that is what this tool does for you.
Can I keep transparency at 40 KB?
Yes, if the output format is WebP or PNG. Exporting to JPG flattens transparency onto white by default — you can pick another background colour in the settings before running.
Is the result exactly 40 KB?
It is at or slightly below 40 KB, never above. The encoder stops when it is within about 2% of the limit, so expect 40 KB down to roughly 39 KB. Under-shooting by 1–2 KB is deliberate: it is what keeps borderline forms from rejecting the file.
Can I process many files at once?
Up to 200 files in one run, processed 4 at a time (or as many cores as you have). Each file is checked separately, failures can be retried individually, and the finished set can be downloaded as a single ZIP.
Does it remove EXIF and GPS data?
Yes by default. Phone photos carry the shooting location, device model and sometimes a thumbnail of the original — re-encoding through a canvas drops all of it. Turn the switch off if you need to preserve metadata.

Related sizes & tools