Runs on your device

Compress an image to any
size in KB.

Name a limit and UnderKB finds the highest quality that still fits. JPG, PNG and WebP, processed inside this tab — nothing is ever uploaded.

KB

Quality is searched automatically. If quality alone can't get under the limit, dimensions step down too.

1 image · drop more here

or drop them here · JPG, PNG, WebP and AVIF

  • Nothing is uploadedYour files are read and re-encoded in this tab, then dropped when you close it.
  • No account, no watermarkFree, unlimited, and there is nothing to install.
  • A whole batch at onceDrop a folder's worth — each file is searched against your limit on its own.

Results

How compressing to an exact size works

Most people arrive here because something imposed a limit: an application form, a university portal, an e-mail gateway. Type that number in Maximum file size, or tap one of the presets, and the tool searches for the highest quality that still fits. JPG, PNG, WebP and AVIF all go in, and you choose what comes out — so you can compress a WebP and keep it WebP, or convert an image to JPG at 50 KB in one pass when a form insists on the extension and the weight together.

Some forms name a range rather than a ceiling: between 20 KB and 50 KB is the usual shape, and they reject a file for being too small just as readily. Fill in Minimum size next to the limit and the same run handles both ends — quality is raised first, then the image is enlarged if it has to be, so what makes the file bigger is picture rather than padding.

The search is a binary one over encoder quality — a dozen or so encodes, all of them in this tab. Dimensions come down only when quality alone cannot reach the target, and every result reports what it settled on, so you can see exactly what was traded away. A 12-megapixel photo usually keeps around 1,600 pixels on its long edge at 200 KB; at 100 KB, expect closer to 1,000.

Each common limit has a page of its own, because the answer really does change with the number: 50 KB, where a scanned document starts to outlast a photograph; 100 KB, where cropping beats every setting; 200 KB, the ceiling most forms impose; 500 KB, where the pixel dimensions stop shrinking; and 1 MB, which is nearly always a house rule rather than a technical one.

Nothing is uploaded. Decoding, resizing and re-encoding all run on your device through the Canvas API — which is also why the tool keeps working with the network off, and why your files are gone the moment you close the tab.

Batches work the same way. Drop a folder's worth of images, name one limit, and each file is searched independently: a screenshot and a photograph need very different settings to land on the same number. Take the results one at a time, or the whole set as a ZIP.

One habit beats every setting: crop before you compress. A tight frame spends the whole budget on what matters, and 100 KB spent on a face or a document reads far better than the same 100 KB spread across a wide scene full of sky.

The full guide: formats, quality settings and what each size limit buys you

Frequently asked questions

Are my images uploaded to a server?

No. Decoding, resizing and re-encoding all happen inside your browser using the Canvas API. Your files never travel over the network, and they are discarded the moment you close the tab.

How do I compress an image to an exact size in KB?

Target size is the mode you land on by default — just type your limit. The tool runs a binary search over encoder quality, and if quality alone cannot get under the limit it steps the dimensions down and searches again. The settings it landed on are shown on each result.

What resolution can I keep at 50 KB, 100 KB or 200 KB?

It depends on the picture, but as a rule of thumb a photograph lands around 550–700 pixels on the long edge at 50 KB, 900–1,200 pixels at 100 KB, and around 1,600 pixels at 200 KB. Flat graphics and screenshots do considerably better, because they compress more efficiently than photographic detail — a scanned page still reads at 50 KB where a landscape would not. Every result reports the dimensions and the quality it settled on, so you can see exactly what was traded away.

Can I increase an image's file size to meet a minimum?

Yes. Some upload forms demand a range — a photo between 20 KB and 50 KB, a signature above 10 KB — and refuse a file for being too small. Fill in Minimum size alongside the limit: the tool raises encoder quality first and, if that is not enough, enlarges the image so there is genuinely more picture to store. It never pads the file with dead bytes, which would satisfy the size check and fail everything downstream. A very small or very flat image may not reach a high floor at all, and the result says so rather than pretending.

Which format gives the smallest file?

WebP is usually 25–35% smaller than JPEG at the same perceived quality, and it supports transparency, so it is the best default for the web. Keep JPEG when a system explicitly requires it, and keep PNG only for flat graphics that must stay lossless.

Will compressing remove EXIF and GPS data?

Yes. Re-encoding drops all metadata, including GPS coordinates, camera model and timestamps. Orientation is read first and baked into the pixels, so photos taken sideways stay the right way up.

Is there a file size or quantity limit?

There is no server-side limit, because there is no server. The practical ceiling is your device's memory — very large batches of 50-megapixel photos will be slower on an older phone than on a laptop.

Does compressing an image twice make it worse?

Yes. Every lossy pass discards detail permanently and the damage accumulates. Always compress from the original file rather than from a file you already compressed.

My file got bigger, or my transparency disappeared. Why?

Compressing alone will not do it: when your file is already under the limit and re-encoding it would come out heavier, the tool hands back the original untouched and says so on the result. Growth comes from the other two settings. Changing format is one — PNG is lossless, so it never degrades a screenshot or a logo, but a photograph saved as PNG is often several times larger than the JPEG it came from; JPEG cannot store transparency, so transparent areas are filled with white. Asking for a minimum size is the other, and there the growth is the whole point. WebP avoids both format problems: it keeps transparency and is usually the smallest of the three. The info button next to Output format sums this up while you work, and the converter covers the case where changing format is all you actually need.

Preview