Compress image to an exact size
Name the size you need. It works backwards to get there, and shows you the arithmetic.
- SECURE
- NO UPLOADS
- NO SIGNUP
- BROWSER BASED
- FREE
- FOREVER.
Support us with a link or a share
Drop an image here
or paste Ctrl+V
Nothing is uploaded. The image is compressed in this tab.
Compress images to a size, not to a quality
Every other image compressor asks you to pick a quality level and then tells you what size you got. That is the easy direction, and it is the wrong one. Nobody wants "quality 70". They want the file under the 2 MB limit the form is enforcing.
Those limits are worth checking before you start, because they are rarely a single number. A YouTube thumbnail, for one, has a 2 MB ceiling when it is uploaded from the phone app and a 50 MB ceiling from a computer — the figures are collected in YouTube thumbnail size. Compressing to the smaller of two ceilings you did not need to meet costs quality for nothing.
Getting there requires a search: encode at some quality, measure the result, adjust, encode again. Doing that by hand is the three-attempts-and-give-up experience everyone recognizes. This tool does the search itself — and shows you every attempt it made, so the number you end up with is not a black box.
If the image contains details that must not survive, use solid image redaction before compression and inspect that flattened download first. Making a face or number blurry is not the same as removing its pixels.
If deliberate concealment rather than redaction is enough, Blur faces keeps every detector suggestion visible for review before creating the source you compress.
If a marketplace or profile needs the subject without its surroundings, use the transparent background maker before changing file size. Background removal changes which pixels exist; compression should work on that reviewed result, not on the photo you meant to replace.
The three formats this reads and writes
| Full name | Joint Photographic Experts Group |
|---|---|
| Extension |
.jpg, .jpeg
|
| Format type | Lossy raster image |
| MIME type |
image/jpeg
|
| Full name | Portable Network Graphics |
|---|---|
| Extension |
.png
|
| Format type | Lossless raster image, with alpha |
| MIME type |
image/png
|
| Full name | Web Picture format |
|---|---|
| Extension |
.webp
|
| Format type | Lossy or lossless raster image, with alpha |
| MIME type |
image/webp
|
How the search works
It is a binary search over the quality scale. Start in the middle, encode, and see which side of the target you landed on. Too big means the answer is in the lower half; small enough means try higher and keep the largest result that still fits. Each round halves the remaining range, so it converges in a handful of attempts rather than dozens.
Before searching a given size, the tool encodes once at the lowest quality it is willing to use. If even that is over your target, no amount of searching at that resolution will help — so it moves straight to scaling instead of wasting five encodes proving a point.
Quality first, then resolution
When quality alone cannot reach the target, the image is scaled down and the search runs again at the smaller size. The order is deliberate: at normal viewing sizes, compression artifacts are less noticeable than a loss of resolution. Reducing dimensions is the bigger visible sacrifice, so it is the second lever, not the first.
When scaling happens, the tool says so and tells you the new dimensions. A photo that silently came back at half resolution is a worse outcome than one that came back slightly larger than you asked.
When the target is impossible
Some targets cannot be met with a usable image. A twelve-megapixel photograph will not become a good-looking 20 KB file, and a tool that keeps compressing until it hits the number produces something nobody wants.
At that point the honest answer is to stop and say so. The right advice is to crop the image, accept a larger file, or ask whether the limit is really that strict — not to hand back a smear of blocks that technically meets the specification.
When the format is the problem, not the setting
This tool re-encodes still images as JPEG and searches for the quality that fits. That is the right approach for a photograph and the wrong one for three kinds of file that turn up here constantly, so it is worth knowing which one you are holding before you start moving the target down.
A photograph stored as PNG. No amount of searching changes the fact that the format is keeping every pixel exactly. Running PNG to JPG first usually removes most of the file in a single step, and that page checks the pixels before promising it — on a screenshot or a chart the same conversion makes things worse, which is exactly the case where you should keep the PNG and accept the size.
An animated GIF. The levers are completely different: palette size, dithering, frame count, then dimensions. Compressing a GIF to a limit spends them in that order and tells you which ones it had to reach for. And if the destination does not truly require an image, the same clip as MP4 is not a small improvement over the best possible GIF — it is roughly a tenth the size and looks better.
A .webp or .avif saved off a web page. The problem there is usually not
weight at all but that nothing local will open it, and
converting WebP to JPG solves the thing you actually have.
An .avif behaves the same way and belongs at
AVIF to JPG — with one warning that runs against the purpose of
this page: both conversions make the file larger, because you are moving from a
codec that compresses well to one that everything can read. Do them for compatibility and
then compress the result here, in that order.
There is a fourth case that arrives from the opposite direction: a video clip that has to become a GIF because a forum, a chat client or a documentation site accepts nothing else. Compressing afterwards is the expensive way round, since the weight is decided when the frames are chosen — video to GIF sets the frame rate and the length of the slice up front, which moves the number far more than any setting here can afterwards.
The limits people actually hit
The presets are not round numbers chosen for tidiness. They are the limits that turn up in practice: upload forms that cap at 200 KB or 500 KB, email attachments around the 25 MB mark, and job application portals that are stricter than anything else on the internet.
The people running into them are rarely sitting at an editing workstation. A phone camera writes eight or twelve megabytes a shot without being asked, and the form refusing it is often open on the same phone — a visa appointment, a rental application, a patient portal asking for a picture of an insurance card, a marketplace listing that will not accept the photo taken thirty seconds ago. Then there are the times the computer is not yours at all: a reception desk, a terminal in a leasing office, a relative's laptop pressed into service because the portal refuses to load properly on a phone. None of that describes somebody about to open a photo editor, and much of it describes somebody who could not install one if they wanted to. A tab that takes the picture, hits the number and gives it straight back is the shape that fits the situation.
If the image is already inside a document, do not extract it and rebuild the pages by hand. The PDF compressor inspects ordinary JPEG image streams in place, measures the complete rebuilt file, and offers a download only when the whole PDF is genuinely smaller. It also says when the document contains an image encoding it cannot safely rewrite, instead of flattening selectable text into pixels.
Nothing is uploaded
Compression happens in your browser, using the JPEG encoder already built into it. That matters for photos more than for most files, because a photo carries EXIF metadata — including, by default, the GPS coordinates of where it was taken. Nothing is uploaded here. The result is a new JPEG made from the decoded pixels: source EXIF and GPS fields are not copied, although the browser encoder may write its own technical color-profile fields. Transparency is composited onto white, an animated image keeps only its first decoded frame, and higher bit depths or grayscale channels are represented through the browser's 8-bit JPEG output. The finished receipt compares the source and output bytes and names those changes. If you need to remove metadata without changing the image encoding, removing EXIF data is the dedicated path.
A smaller image is useful evidence only when images are actually part of the measured page problem. The PageSpeed Insights and Lighthouse report analyzer can identify image-related audit failures and reported byte savings alongside scripts, CSS, server delivery and layout stability, so compression is not prescribed merely because an image exists.
Questions
Why do other compressors ask me to pick a quality?
Because encoding is the easy direction: pick a quality, see what size you get. Going the other way needs a search — encode, measure, adjust, repeat. That is what this tool does, and it shows you each attempt rather than hiding them.
What if my target is impossible?
It tells you, rather than producing something unusable. Past a certain point the right advice is to crop the image or accept a larger file, not to keep degrading it — so the tool says so instead of quietly returning mush.
Is the image uploaded?
No. The compression happens in your browser using the same encoder your browser uses everywhere else. The file never leaves this tab.