Runs on your device

Compress an image to any
size in KB.

Name a limit — 100 KB, 200 KB, whatever the form demands — and UnderKB finds the highest quality that still fits. Works on JPG, PNG and WebP, and every pixel is processed inside this tab: nothing is ever uploaded.

Drop images here

JPG, PNG and WebP · as many as you like

1 image · drop more here

Results

Compressing to a specific file size

Most people arrive here because something imposed a limit: an application form, a portal, an e-mail gateway. Type the number in Maximum file size — or tap one of the presets — and the tool searches for the highest quality that stays under it, reducing dimensions only when quality alone cannot get there. Here is what each common ceiling realistically buys you.

How to compress an image to 100 KB

100 KB is the tightest limit still in common use, typically on older government portals and forum avatars. A normal photograph will not keep its full resolution here: expect to land somewhere around 900–1,200 pixels on the long edge. Because the budget is so small, cropping first pays off more than anything else — 100 KB spent on a tightly framed face or document looks far better than the same 100 KB spread across a wide scene full of background detail.

How to compress an image to 200 KB

This is by far the most common ceiling on government, university and job application forms, which is why it is the tool's default. 200 KB is comfortable: a 12-megapixel photo usually keeps roughly 1,600 pixels on the long edge at a quality that still looks clean, and a scanned document stays readable at full page width. If a form rejects your file without saying why, 200 KB is the first limit worth trying.

How to compress an image to 500 KB

At 500 KB you are usually no longer trading away pixels. Most photographs reach this target by lowering quality alone, keeping their original dimensions intact — the tool will tell you, since each result reports the dimensions it ended on. This is a sensible ceiling for e-mail attachments, content management uploads and anywhere you want the file smaller without visibly touching it.

How to compress an image to 1 MB

1 MB is rarely a hard requirement; more often it is a house rule for keeping a media library or an inbox manageable. Almost any single photograph fits at full resolution and high quality, so treat it as a safety net rather than a constraint. If you are preparing images for a web page rather than a form, ignore the megabyte and aim far lower — see the guide below on why page weight matters.

A short, practical guide to image compression

Images are the heaviest thing on most web pages, and the single easiest thing to make lighter. Here is what actually happens when you compress one, and how to choose settings you won't regret.

Lossy and lossless are two different jobs

Lossless compression — PNG, and WebP in lossless mode — rewrites the same pixels in a more compact form. Reverse the process and you get the original back, byte for byte. It works brilliantly on flat colour: logos, screenshots, diagrams, anything with large uniform areas and hard edges. It works poorly on photographs, because photographic noise leaves almost no repetition to exploit.

Lossy compression — JPEG, WebP, AVIF — throws information away and never gives it back. The trick is that it throws away the information your eyes are worst at noticing. The encoder splits the image into small blocks, converts each one from pixels into frequencies, and then rounds off the high-frequency detail most aggressively. It also stores colour at lower resolution than brightness, because human vision resolves luminance far more sharply than hue. This is why a photograph can lose 90% of its bytes and still look untouched, while the same treatment applied to a screenshot of text produces visible fringing around every letter.

Why file size is worth your attention

Page weight is a ranking and revenue problem, not just a tidiness one. Largest Contentful Paint — one of Google's Core Web Vitals — is usually a hero image, so its file size directly sets how fast your page is judged to load. On a mid-range phone over a mobile network, shaving 800 KB off a hero image can move that metric by more than a second. Visitors on metered data pay for every kilobyte you send them, and conversion rates fall measurably as load times climb.

There are blunter reasons too. Government portals, job applications, insurance claims and university forms routinely cap uploads at 200 KB, 500 KB or 2 MB, and reject anything larger without explaining how to fix it. Email providers cap attachments around 25 MB. Content management systems slow to a crawl when a media library fills with 8-megapixel originals nobody ever needed at full resolution.

Choosing a format

Getting a good result

Resize before you reach for quality. A 4000-pixel-wide photo displayed in a 800-pixel column is carrying twenty-five times more pixels than it will ever show; halving the dimensions cuts the file to roughly a quarter before the encoder does any work at all, with no visible loss whatsoever. Only once the dimensions are right should you lower quality, and quality between 75 and 85 is the range where most photographs look identical to the original at a fraction of the weight. Below about 60 you start to see blocking in skies and smooth gradients.

Finally, always compress from the original. Every lossy pass discards detail permanently, and a file compressed three times carries the scars of all three. Keep your masters somewhere safe and treat compressed copies as disposable output.

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 100 KB or 200 KB?

It depends on the picture, but as a rule of thumb a photograph lands around 900–1,200 pixels on the long edge 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. Every result reports the dimensions and the quality it settled on, so you can see exactly what was traded away.

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?

Those are the two format trade-offs. 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. WebP avoids both 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.

Preview