photomopOpen the studio

Compress

Compress an image until it fits the limit.

Name a file size in kilobytes. The tool re-encodes until the photo fits, keeps the dimensions, and stops at the best version that still makes it.

Hits a byte targetKeeps the dimensionsNothing uploaded

The short answer

To compress an image, add the photo, type the file size limit in kilobytes, and run the tool. It encodes the picture several times at different quality settings and keeps the largest file that still fits under your number, so the result is the best-looking version that meets the rule. Dimensions stay as they are, and the work happens on your own device.

Compress a photo now

Type the limit the form gave you, or pick one of the common ones. The readout shows what came out and how much lighter it is than what went in.

Before

Presets

Add a photo first.

Checking what this device can do. Nothing is uploaded.

Download

Add a photo and run the tool. The download appears here.

The short version

What to know before you start

There is no formula from quality to file size. How many bytes a photograph takes at quality 80 depends on the photograph: a plain studio background compresses to almost nothing, and a market stall full of texture does not. Any tool that offers you a quality slider and calls it compression is asking you to guess and then check.

So this one measures. It encodes the picture, looks at the result, and adjusts, ten times over, narrowing on the highest quality whose output still fits under your number. Ten encodes sounds expensive and is not: it happens on your own hardware with no round trip, and on a normal photo it is done before you have finished reading the readout.

  • A byte rule is not a pixel rule

    Upload limits are usually written in megabytes and dimension rules in pixels. They come from different parts of a pipeline. Compress for the first, resize for the second, and read the rejection message before choosing.

  • The search beats a slider

    Quality 80 means a different file size on every photograph. Naming the size you need and letting the tool find the quality is the only version of this job that ends in one attempt.

  • Format is the biggest single lever

    Moving a photograph from JPEG to WebP typically saves a quarter to a third at the same visual quality. If the destination accepts WebP, that one change often makes the target trivial.

  • Some pictures resist

    Fine texture, foliage, fabric and noise all cost bytes. When a target cannot be met at a usable quality, the honest next step is fewer pixels, and the tool says so rather than quietly ruining the picture.

  • Screenshots are a different problem

    Text and flat colour show JPEG artefacts immediately. Keep screenshots as PNG, or convert to WebP, which handles sharp edges far better than JPEG does at the same size.

  • Compress last

    Every lossy encode is permanent. Do the crop, the resize and the colour work first, and compress once at the end, from the best version you have.

Step by step

How do you compress an image to a target size?

Four steps, and the whole search runs on your own device. There is no queue and no waiting.

  1. 1

    Add the photo

    Drag a file onto the panel, click to browse, or paste from the clipboard. The readout shows its current dimensions and file size, which is the number you are trying to beat.

  2. 2

    Type the limit

    Enter the target in kilobytes, or press one of the common limits: 100 KB for an application form, 500 KB for email, 1 MB for a marketplace listing.

  3. 3

    Pick the output format

    JPG is the safe default for uploads. WebP is usually a quarter to a third smaller at the same quality, and AVIF smaller still where the browser can write it.

  4. 4

    Run it and download

    The tool encodes the photo several times, keeps the best result that fits under your number, and shows how much lighter it is. Download it straight to your device.

How does compressing to a target size actually work?

By binary search. The tool encodes at a middle quality, measures the result, and then halves the remaining range in whichever direction the answer points: too big, lower the quality; comfortably small, raise it. Ten rounds narrows the quality axis to a fraction of a percent, and the file it keeps is the largest one that still fits.

That last detail is the point. Anyone can hit a size target by encoding at quality 30 and calling it done. The useful answer is the highest quality that meets the rule, because the picture still has to be worth uploading when it gets there.

If the quality floor is reached and the file is still too big, the picture has more detail than the budget can hold at that size. The tool then reduces the pixel dimensions by the square root of how far over it is, and tries again, up to three times. Every one of those passes is reported in the notes under the result.

Which format should you compress to?

JPG is the compatibility answer. Every upload form on earth accepts it, and for photographs it is still respectable. Choose it whenever the destination is old, unspecified, or a government portal.

WebP is the practical answer for anything on the web. It is supported everywhere that matters now, handles sharp edges far better than JPEG, and on a typical photograph saves a quarter to a third of the bytes at a quality nobody can tell apart.

AVIF would be smaller again, and it is the one with a caveat. Reading AVIF is nearly universal; writing one from a canvas is not, and Chrome answers the request with a PNG rather than an error. The picker encodes a single pixel at load and disables the option when no real encoder answers, so you never get a file with the wrong name inside. The converter goes into it further.

How much quality do you actually lose?

Less than the numbers suggest, and more on some pictures than others. JPEG and WebP both work by throwing away detail the eye is bad at noticing, which is why a photograph at 70 percent quality usually looks identical at normal viewing size and a screenshot at 70 percent looks obviously wrong.

The failures to watch for are blocking in flat areas like skies, ringing around hard edges like text and product outlines, and colour banding in gradients. If you see any of them, raise the target rather than lowering it: the tool is telling you the budget is too tight for this picture.

Lossy compression is permanent. Save the original. If the same photo has to meet three different limits, compress the original three times rather than compressing a compressed file.

What the compress tool accepts, produces and requires
PropertyDetail
Input formatsJPG, PNG, WebP, AVIF, GIF, BMP. HEIC where the browser can decode it.
Output formatsJPG and WebP everywhere current. AVIF only where a browser exposes an encoder, which today is almost nowhere.
Target unitKilobytes. The search aims for the band just under your number.
SearchUp to ten encodes per pass, then up to three reduced-size passes.
DimensionsUnchanged by default. Reduced only when you allow it and quality alone falls short.
TransparencyFlattened onto a colour you choose when the output is JPG.
Model downloadNone. This is a canvas operation and runs on the first click.
Where it runsIn this browser tab, on your device, in a background thread.
Export limitsFull resolution, no watermark, no credit counter.

Slide the table sideways to see every column.

Worth avoiding

Where this usually goes wrong

  • Resizing when the rule was about bytes

    Shrinking the dimensions does reduce the file size, so it looks like a fix. It also throws away resolution the destination might have wanted. Hit the byte target and keep the pixels.

  • Compressing a screenshot as JPEG

    Text and interface edges are exactly what JPEG handles worst. Keep the screenshot as PNG, or convert it to WebP, which stays clean at a fraction of the size.

  • Compressing an already compressed file

    Each lossy pass builds on the artefacts of the last. Go back to the original and compress once for each destination.

  • Setting a target far below what the picture can hold

    A detailed 12 megapixel photograph will not become a good 50 KB file. The tool will tell you it could not get there without shrinking; that message is information, not an error to work around.

  • Waiting for the AVIF option to appear

    If it is disabled, your browser has no canvas encoder for it, and that is not something a page can work around. WebP gets most of the saving and works everywhere current.

  • Compressing before the edit is finished

    Do the crop, the resize and the background work first. Compression is the last step, because everything after it inherits the artefacts.

Questions

What people ask about this tool

Every answer is in the page source, so a reader and an answer engine get the same words.

How do I compress an image to a specific file size?

Type the number the upload form gave you in kilobytes, then run the tool. It encodes the photo repeatedly at different quality settings, narrowing in on the largest file that still fits under your limit, and stops there. The result is the best-looking version that meets the rule.

Does compressing an image change its dimensions?

Not by default. Compression works on how the pixels are stored rather than how many there are. If your target is so small that even the lowest useful quality overshoots, the tool can shrink the pixels as a second step, and it tells you when it did. Turn that off if the dimensions must not move.

What is the difference between compressing and resizing?

Compressing changes the file size and leaves the dimensions alone. Resizing changes the dimensions, and the file size follows as a side effect. Read the rejection message: a rule in megabytes is a compression job, and a rule in pixels is a resize.

Will compressing make my photo look worse?

It can, and how much depends on the picture and the target. Photographs with a lot of texture take compression well. Flat areas, gradients and screenshots with text show it first, as blocking and haloing around edges. The tool stops at the highest quality that fits, so you get the best available version of the trade rather than a fixed setting.

Which format compresses best?

For photographs, WebP is usually 25 to 35 percent smaller than JPEG at a comparable quality, and it is the best option that actually exists in a browser today. AVIF would be smaller again, but browsers read it far more widely than they write it, so the option is usually disabled here. JPEG remains the safest choice when an upload form is old or unspecific.

Can I compress a PNG?

You can read one in, but PNG has no quality dial: it is lossless, so the only way to make it smaller is fewer pixels. If the source is a photograph, convert it to JPG or WebP here and the size problem solves itself. If it is a logo or a screenshot with flat colour, PNG is already the right format and cropping is the honest lever.

Is my photo uploaded to compress it?

No. Every encode in the search happens in this browser tab, on your own device. That is also why a search of ten encodes on a large photo is fast: there is no round trip, only your own processor.

Under the limit. What else does the form want?

Set exact pixel dimensions, change the format, crop to the ratio, or point all of it at a folder. Every tool in the studio runs on your device.